Im trying to rotate an object 90 degrees to the left but instead of rotating straight left it rotates 270 degrees to the right.
Here’s the part of the code which controls the rotation:
rotationDestination = new Vector3(60, 270, 0);
if (Vector3.Distance(transform.eulerAngles, rotationDestination) > 0.2f)
{
transform.eulerAngles = Vector3.Lerp(transform.rotation.eulerAngles, rotationDestination, rotationSpeed * Time.deltaTime);
}
If I try to make the Y axis -90 a.k.a (60, -90, 0) then it rotates constantly to the left.
How do I make it rotate straight to the left (90 degrees) ?
Thank you.