Detect a Direction in Code

Is there a way to detect if somthing is moving is a certain direction?

I believe I have some code that I could modify to work like that for you

ok, im making a pong remake, thats why i need it

Math ways to skin that cat :slight_smile:

You could extract the x/y velocity to determine the direction.
You could compare it’s position to a reference position.
It all depends on what exactly you need :slight_smile:

I have a sightly Janky Pong example here if you want to look at it for ideas: https://flowlab.io/game/play/597669

thanks grazer! that helped, its still very Jank, but its playable (: https://flowlab.io/game/play/1520183