- Home /
Testing if object rotation differs from given rotation and rotating towards it?
I have two objects and I would like to test if ones rotation matches with another object's rotation. If it doesn't match I would like to rotate the first object with a certain speed towards the other object's rotation.
How could I achieve this?
Comment
Best Answer
Answer by Slobdell · Jul 13, 2013 at 02:18 PM
if(object1.transform.rotation != object1.transform.rotation){
Lerp the rotation using Quaternion.Lerp
}
search for lerp if you're not familiar with it there's unlimited questsions already on the topic
Dumb question of the day. That was pretty obvious :)
Thanks.
Your answer
Follow this Question
Related Questions
rotation x changes all angles? 3 Answers
Rotating GUI Texture By Angle 2 Answers
Limit Object Angle 2 Answers