Godot Version
v4.6.1
Question
Say I have an enemy in a game that I have based on a character2D root node, and I want the enemy to attack with its body in a complex motion I’d like to design using the animation system.
Say the structure at the moment is:
Characterbody2d
|-CollisionShape2DBody
| |-Sprite2D
| |-Area2Dhurtbox
| |-CollisionShape2D
|-Node2DStaticElements (resists rotation)
|-Healthbar
If you animate the position of the characterbody2D directly this obviously doesn’t work since there’s no relative position (also will that cause physics bugs?).
Making the root node just a node2D would let you do it, but it seems like some clarity is lost by moving the root node from characterbody2D when that most accurately reflects the purpose of the scene. (also the physics question again)
What’s the best way to do this kind of thing?