How do I fix directional idle animations?

I’m creating a character for a combat game I’m making, and I’ve finished the animations. I decided to copy the Isometric game template roughly, then adapt it to speed things up. For the most part, it’s gone okay, and I’ve rebound the keys to wasd, added my animations, and a little background.
There’s a slight problem though. Using this loop:

The last three animations don’t get played. Instead, for up left, up, and up right, it runs in place (in those directions). I’ve double checked that I’m using the right animations, and that the calculations are correct. What’s more, the other idle animations all work perfectly. Anyone know what I’m doing wrong?

animations 13, 14 and 15 don’t get played. It’s like they’re cut off somehow

For anyone with a similar issue, I figured it out.
For whatever reason, while moving a top down object, the object.TopDownMovement::Angle() call returns a value between 0 and 360, with 0 being 3 O’clock (right/east). When not moving, that 360 field becomes a 180 field, wherein 3 O’Clock to 9 O’Clock becomes 0-180, and 9:01-2:59 becomes -0 to -180, and as such, my equation was giving me effectively the animation I wanted -8 spaces, which meant that I was getting the walking animations for the correct directions, instead of the idle animations.

1 Like

Yes, that’s correct! This is actually how angle of all objects are calculated, though. It’s explained in the wiki page but is not very obvious in the editor.