Hello guys! I use this script for rotation my gameobject after every collision, but i dont understand how to make my rotatio smooth??
function OnTriggerEnter (other : Collider) {
if (other.tag == "1FLTrigger"){
transform.Rotate (0, -10, 0);
}
}
I’ve try also use this
transform.rotation = Quaternion.Slerp (transform.rotation, Quaternion.Euler(0, 10, 0), 20.0);
But i can’t figure out how to correctly set Quaternion.Euler - i need, that after each collision it turn about 15 degrees( Thanks in advance!)