Tween won't rotate past 180°

Having trouble with rotations tweens.

I’m facing an issue with using tweens when trying to rotate an object smoothly towards the cursor (since I didn’t like the original rotation condition), however I’ve encountered a problem. The rotation works perfectly until the object needs to cross the 180° threshold. In this scenario, instead of taking the shortest path, it rotates from 180° counterclockwise to -180°. If anyone knows a solution for this please let me know, it would be greatly appreciated.

Sorry if that’s confusing, I can explain more if needed.

You use OR condition and inside it AND (literally search OR and AND in condition search bar) if you are going for some range

For example looking at this picture (You see here actual angle values)

Lets say i wanna do something when angle is between +135 and -135 but covering smaller left side pice not bigger right side piece
Like on image below


I would need these conditions
Checking if cursor is at range from -180 to -135 OR +135 to +180

So basically i am checking for 2 possible scenarios and if at least ONE of them is true i for example change my characters animation to be horizontally flipped (making it face left) and change head animation to face straight instead of diagonal up or down

If you wanna see how it works
Move cursor around player and look how head animation change depending on angle of cursor to player

There is an expression to get the shortest direction:

TargetedAngle = Object.Angle() + AngleDifference(Variable(MouseAngle), Object.Angle())


Forgive me if I am misunderstanding but it seems like you aren’t quite understanding the question. My issue is with raw rotation tweens instead of animations.

1 Like

All sorted, had to drop tweens and go back to lerps but was worth it. :confused: