Hello,
I was wondering how can I rotate a simple sprite by 180º. However, I just do not want an normal rotation. I want a movement rotation. With this code, my sprite rotate right after the mouse click. I want that my sprite rotate slowly, so we can actually see it. I hope you can understand. Thank you.
public class Example : MonoBehaviour {
void Update() {
if (Input.GetMouseButton(0))
{
transform.Rotate (Vector3.forward * -90);
}
}
}