- Home /
Rotation facing the right way problem
I have this whale and I would like to have it rotate by its head. It has a velocity. Basically what I am doing is every so often the whale gets a new velocity ( I store the old and compute a new)
I am trying to rotate by means of the following
float diserAngle = Vector2.Angle(oldVelo, newVelo) ; Vector3 vec = new Vector3(0,0,diserAngle);
iTween.RotateTo(gameObject, vec, 2F); oldSpeed = newVelo;
It seems to only look natural when going to the left of the screen. When it needs to rotate towards the right of the screen the whale looks like it does not rotate and wadles backwards.
Your answer
Follow this Question
Related Questions
Rotate a GameObject [set front] 1 Answer
3rd person unit control 0 Answers
Updating new cube face positions after rotation 0 Answers
Play different animations based on direction character is facing, while following the mouse. 1 Answer
Problem with the look direction after Instanciate/Rotate 0 Answers