Godot Version
4.2.2
Question
I’m starting and I can’t find a proper solution for rotating collision shapes of characters with irregular shape.
In Godot 3D tutorial you create characters as CharacterBody3D with Pivot child containing the mesh and CollisionShape child. Then on movement, you rotate the Pivot, not the whole CharacterBody3D.
I understand you don’t rotate the whole CharacterBody3D because this would affect velocity. It’s better to keep the reference coordinates unchanged and only rotate the model.
But what about the CollisionShape rotation?
What if the model shape is irregular, requiring irregular CollisionShape? Like in here:
- Do you have to use CollisionPolygon?
- I know you can use “Create Trimesh Collision Sibling” - can you somehow group meshes to create a single Collision Sibling? Or you create 2 separate CollisionShapes?
- When you rotate the Pivot in code, do you just rotate the CollisionShape too (setting CollisionShape rotation same as Pivot rotation)? Or is there a “smarter” way of doing it? Use RemoteTransform? But for it to work, the CollisionShape must be a single node with rotation point in (0,0,0), just like the Pivot.
I hope you understand my confusion.