Answer the question
In order to leave comments, you need to log in
How to store rotation into a variable (Unity)?
It is necessary to somehow save the rotation along the z axis into a variable, please tell me how to do this?
Let's say: the object is rotated along the z-axis by 45° degrees, how can these "45 degrees" be stored in a variable?
Answer the question
In order to leave comments, you need to log in
in short, how exactly with rotations xs, but if you really need Z in movement, then I do float posX = gameObject.transform.position.z;
this, push off from this and come to a decision yourself. It will be better for you)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question