As the title says, I want to rotate a rotor to a specified angle, taking the shortest route. This seems it shouldn't be too difficult, the only problem is due to the fact that 359 is a lot closer to 1 than 358 degrees due to overflow/underflow. However, I can't seem to get my script to work, and it is driving me crazy. Perhaps a new set of eyes might help?
[Solved] Rotate rotor to specified angle
Code:
if(angleCurrent < 0)
{
angleCurrent += 360;
}
if(angleTarget < 0)...