How to approach animating attacks/movement with body of a character2D based enemy?

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?

What type of complex animation?

Like move around, rotate, scale whatever. Just some mix of modifying the properties to move around in a dynamic way.

Concretely it could be something like an enemy that jumps up and hurls itself at the player, or spins around and moves in some fancy pattern like a figure 8.

I am no expert but I think making the enemy a Node2D while it’s jumping around showing the skills would be easier to work with.Make sure to block the player from approaching that enemy while it’s jumping(playing complex animations) around.

Why block the player? The point of the enemy is to hit the player in this abstract case. Also does directly manipulating the position of physics bodies cause physics calculation issues?