Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
mrgreen72's avatar
mrgreen72
Superstar
9 years ago
Solved

How to determine if the player is rotating clockwise or counterclockwise?

I'm currently developing in UE4 but it's a general math programming question.

Say you have the player with his arms extended in a T pose and then you want to detect if he's rotating (keeping that pose) clockwise or counterclockwise. The player has to be able to look wherever he wants so can't use the camera rotation and he can also be facing any direction.

I'm detecting the required proper pose properly, I'm then measuring the delta between hands positions from frame to frame which gets me a direction and a velocity but I can't for the life of me figure out how to tell if it's going clockwise or not.

Any tips?

1 Reply