So I have an object composed by various sprites.
When I press a key (left or right) it should rotate left or right.
In fact, it does rotate, simply by “transform.Rotate(0f, 0f, 30f);”
What I want to do is animate it so it gradually rotates until it reaches the max rotation and it stops. when i press it again, the max rotation increases and it can rotate “30f” more.
I can’t do it through an animation (I think), because those sprites can change from one object to another. Like, in one object there is one red sprite but in the other one there can be three of them. How can I animate it through scripting?
Thank you guys!
1 Answer
1Vector3.RotateTowards should work find for this, it gives you all the control you need.
I'm gonna try that, thanks!
– Powarader