01-17-2014, 08:27 AM
(01-17-2014, 07:30 AM)'Jake' Wrote: Hi,
have you tried setting localRotation instead of rotation?
Thanks for the reply, you were right.
Changing
Code:
transform.rotation = Quaternion.RotateTowards(transform.rotation,Quaternion.LookRotation(finalDirection),Mathf.Deg2Rad*angleChangeSpeed);
Code:
transform.localRotation = Quaternion.RotateTowards(transform.localRotation,Quaternion.LookRotation(finalDirection),Mathf.Deg2Rad*angleChangeSpeed);
Thanks again for replying and helping me out.