- Home /
Get my head around Unity Rotations
Hey, im comming from a VFX background and have just started playing around with unity. But i just can't get my head around the whole rotation thing.
If i in unity take a plane, set the rotation to 270 , 0 , 0 the object rotates as it should facing the Z axis. However if i want to now tilt the object say, 90 degrees. I can't do it. Putting 270 , 90 , 0 will rotate the object around the Y axis, and putting 270 , 0 , 90 will do the exact same thing. While in any 3D application putting 270 , 90 , 0 would eighter tilt it in its own or the world Z axis.
So in java i have set up the following:
Transform.Rotate(Vector3.down * Input.acceleration.y);
This slowly rotates the object around the Z axis as i want, but i want to set a absolute rotation and not slowly make it rotate around its own axis (ie Rotate 90 degrees, and stop)
So i tried the following
transform.rotation = Quaternion.Euler(Vector3.down * Input.acceleration.y)
That just introduced the problem described earlier.
What am i doing wrong?
Answer by whydoidoit · Apr 30, 2013 at 10:52 PM
Not quite sure I'm getting your concern. The rotation is in world coordinates and they are applied simultaneously - so 270 rotates the object around the X axis (of the object without rotation) and 90 rotates it around the Y axis (of the object without rotation) at the same moment.
If you want to combine a sequence of rotations then put the plane inside an empty game object and set the rotations in the order you prefer.
Your answer
![](https://koobas.hobune.stream/wayback/20220613101307im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Simulating 3D object rotation in a 2D space/system? 1 Answer
How to rotate ? 2 Answers
want to make a fixed rotation speed in Lerp no matter what the angle is 2 Answers
Rotation of an object 3 Answers