Hi all,
I'm making a simple flying enemy for my platformer prototype and I would like to animate a up and down movement while it flies. The enemy is a KinematicBody with its hitbox CollisionShape2D, a Sprite and an AnimationPlayer. I move the enemy's left and right position via script and the flying up and down movement with the AnimationPlayer. The issue is that I want the Sprite and the hitbox to move together so I duplicated the animation for each as seen on this screenshot :

I would like to have to define the animation only once so one possibility would be to group the Sprite and hitbox under a Node2D parent and animate the parent's position but then the KinematicBody complains it doesn't have a Shape because it only looks at its direct children.
Do you know how I could achieve this in a clean way?
Thank you