- Home /
Getting turn direction (between -1 and 1)
I'm trying to set up a script to get the direction my character is turning. Right now I'm comparing the previous frame's rotation to the current frame's rotation, but that's not working out as I want. Here's what I'm trying to accomplish, I can't exactly figure out how to execute it: ![alt text][1] I don't know if this should involve input or just angle checks, but I cannot for the life of me find a solution to this that works out exactly as needed.
Image: https://i.gyazo.com/f4db83af22363ce2991b991e9719554c.png
[preview of external content removed for GDPR compliance as it was including 3rd party cookies]
So adding a gizmo to help with the turning direction I was able to get the right angles, but the issue is now I don't know how to get it to return a negative value when I'm moving counter-clockwise.