How do I…
Like with force or pathfinding, there should be an angle condition with Boids, but I can’t find one. How do i know the angle of movement of a sprite using Boids ? I need it to change the sprite animation, like if the sprite is moving up then upward animation.
What is the expected result
The sprite should change animation accordingly.
What is the actual result
It doesn t.
Related screenshots

If there’s not an expression then per CoPilot, you can use ATN2(VelocityY, VelocityX) and then convert it to degrees. You can use it directly or store it in a variable.
ToDeg(atan2(NewSprite.BoidsMovement::VelocityY(), NewSprite.BoidsMovement::VelocityX()))
My test event
If there’s not an expression in the Boids behavior, then it couldn’t hurt to also add a feature request.
Before you answered I made my own “fix”. With sitcker i stuck arrows to my enemies, then i rotated the arrow to the player position, the angle of the arrow changes the animation. Keep in mind that the angle of a sprite does not work like the usual angle of movement or pathfinding angle, it goes to -150 and then jumps to 150, kinda weird, you have to test by yourself.
Here is a picture to show you, here’s my fix to Boids angle.
1 Like