Hello,
First time poster and kinda new to Godot. I'm trying to figure out a figure eight hovering pattern. Current setup is a KinematicBody2D node using the below code snippet to move around a point. However, it seems to drift off and I haven't been able to figure out why. Any insight would be helpful.
I did try running a search on this topic prior to posting with little success. Are there other ways I could try achieving this effect that would be more effective?
Also please let me know if I need to format the code a certain way. I didn't see anything mentioning it but I may have missed something.
velocity = Vector2.ZERO
angle += delta
if angle > 2*PI:
angle = 0
velocity.x = cos(angle)
velocity.y = pow(cos(angle), 2) - pow(sin(angle), 2)
Thanks,
Lina