Replies: 1 comment
-
There isn't, because CollisionShape3Ds don't actually correspond to MeshInstance3Ds in Godot. Your CollisionShape doesn't have to match your MeshInstance at all (and in many cases, often shouldn't). Completely separate objects. The best you can really do is separate your geometry by material types as needed, apply a property to them that dictates what material type they should be considered, and then use the collision methods to determine what kind of material the collision object is "made of". It's a bit more abstracted in that sense, but it's the best and most performant way to do it in Godot as far as I've looked into. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there an easy way to find out which CollisionShape3D belongs to which Surface of a MeshInstance3D?
I am trying to shoot a ray at the map and i would like to use the materal for things like choosing the correct footstep sound or bullethole sprite.
The way I see it I would have to take the coordinates of the collision and then go into the mesh array and calculate which surface lies on the collision (I would rather not honestly).
It would be cool if in the export process CollisionShape3D's could be added to groups automatically clarifying which surface it belongs to, or maybe someone has a better idea.
Beta Was this translation helpful? Give feedback.
All reactions