I have been searching online and weirdly I can’t find anyone talking about this? It seems like it should be simple but I really can’t figure out how to detect if the player is rotating Clockwise or Counter-clockwise.
For reference, my game has tank controls (its a retro-like survival horro game) and I want different animations to play if you’re rotating left or right
Hello Mastatatoe,
Interesting problem, I first wondered if dot product could be used (comparing previous vector to new vector) - But that only returns a positive number until you are past a 90 degree threshold with the previous vector. (So for example if you look 45 degrees to the right or left that will return the same positive number)
I then thought - 'Why not just compare the current yaw with previous yaw to see which direction the rotation happened in?" this works ok, up until a hiccup on the threshold between +180 and -180.
Then I found the ‘Delta (Rotator)’ node - and the hiccup was solved:
This is a very ‘raw’ way to get rotation direction, In the context of animation some other paths might be basing it on player input actions, also there’s probably something built into the animation system to help with this. (something something blend spaces?)

