Comments and answers for "change the rotation"
http://answers.unity.com/questions/220394/change-the-rotation.html
The latest comments and answers for the question "change the rotation"Answer by Kleptomaniac
http://answers.unity.com/answers/220877/view.html
Unity is all about learning! You can't just make people write your scripts for you. However, it's a relatively simple script. I'll give you some pseudo code which you can extrapolate on:
if (player.transform.rotation == Quaternion.Euler(270,0,180) || player.transform.position == Quaternion.Euler(270,270,0)) {
object.transform.rotation = Quaternion.Slerp(startRotation), Quaternion.Euler(270,0,180), Time.time * 0.1);
} else {
object.transform.rotation = Quaternion.Slerp(startRotation, Quaternion.Euler(270,0,0), Time.time * 0.1);
}
}
For more info on Quaternion.Euler and Quaternion.Slerp, go [here][1] and [here][2].
Hope this helps! Klep
[1]: http://unity3d.com/support/documentation/ScriptReference/Quaternion.Euler.html
[2]: http://unity3d.com/support/documentation/ScriptReference/Quaternion.Slerp.htmlSat, 25 Feb 2012 10:27:01 GMTKleptomaniac