- Home /
Floats and Angles: Check for overshooting
So I'm having problems wrapping my head around dealing with the 360 degree wraparound of Euler angles. Currently I'm trying to rotate an object on just the Y axis to a target rotation by adding or subtracting increments of angles and checking if it overshoots and correcting if it does. I have no problem finding out the angle to add (clockwise or counter-wise). My problem is that I can't tell when the angle overshoots. Under normal circumstances for floats, I'd just do a simple inequality check but that doesn't always work with angles unfortunately. Pretty much I'm doing a Quaternion.RotateTowards on 1 axis completely under my control.
Note: I have to do it this way no matter what. I've thought long and hard about how I would rotate my objects and this is the only way that will make rotations 100% independent of framerate and thus 100% syncable.
Your answer
Follow this Question
Related Questions
show float with no decimals and no scientific notation? 1 Answer
FPS rotate toward object for second 0 Answers
Lookrotation for TwinStick Shooter 0 Answers
Code Problem 3 Answers