I'm playing around with the plugin system, and I wanted to add a gizmo that has collision triangles. A gizmo that needs to add collision triangles will not work correctly if it's working with multiple TriangleMeshes: only the last one added is checked for collision.
Tested versions
Reproducible in: 4.3.beta [0918fd2], 4.2.2.stable, 4.1.4.stable
System information
Windows 10 - Godot v4.2.2.stable
Issue description
I'm playing around with the plugin system, and I wanted to add a gizmo that has collision triangles. A gizmo that needs to add collision triangles will not work correctly if it's working with multiple
TriangleMesh
es: only the last one added is checked for collision.The implementation of
EditorNode3DGizmo::add_collision_triangles
seems to be the culprit: https://github.com/godotengine/godot/blob/ff8a2780ee777c2456ce42368e1065774c7c4c3f/editor/plugins/node_3d_editor_gizmos.cpp#L361-L363I consider this a bug because it is inconsistent with the way other functions, like
add_mesh
andadd_collision_segment
, work.Steps to reproduce
Minimal reproduction project (MRP)
Editor3DNodeGizmo AddCollisionTriangles MRP.zip