#Need help making a CharacterBody2D move up and down while moving in a random direction + rotation

1 messages · Page 1 of 1 (latest)

spark rock
#

Simple solution is to make the fly a child of another node.
The parent of the fly would move in a straight line. While the fly itself would move up and down.

#

Doesn't even seem like they need any collisions. So it shouldn't change much.

jolly eagle
#

Would this work if I do it only for the sprite without changing the parent node? Ie, CharacterBody2D flies straight while AnimatedSprite2D goes up and down.

Also I still don't know how I can do the up and down effect since the enemy can come from any direction including top and bottom parts (In which case the enemy would need to wobble to the sides)

spark rock
#

Altho, do these really need to be CharacterBody?

#

Will there be obstacles they must "crash" against?

jolly eagle
#

They need to stop when they reach the middle part but I do that without using collisions so I guess not