Hi,
I am trying to rotate an object using x,y co-ordinates to generate the needed angle. I have this working fine, however if the point is for example 340 degrees, and the object is currently 10 degrees, the object transitions clockwise all the time, taking the long way round.
I have also tried to manual change the angle by changing
object.rotation to object rotation - 2 every enterframe, but this doesn’t work as the objects rotation goes into minus numbers rather than looping round to 360.
I’m basically looking for a way to tell if its quicker to rotate left or right.
If anybody could help I’d be grateful.
Thanks
Gary