- Home /
Question by
aurelio9 · May 26, 2017 at 04:51 AM ·
rotationquaternioncamera rotaterotation axis
Why does the direction of the axis changes behaviour in Quaternion.AngleAxis?
I have a camera and I rotate it with the following
transform.rotation = Quaternion.AngleAxis(45.0f,Vector3.up);
the docs for Quaternion.AngleAxis
Creates a rotation which rotates angle degrees around axis
line above rotates the camera around Y axis( used to turn right and left like in a fps game) 45 degrees to the right.
When the line is modified to:
transform.rotation = Quaternion.AngleAxis(45.0f,Vector3.down);
I am expecting this to rotate to the right as well since direction of the axis that the object rotates around should not matter.However it rotates to the left, am I missing something very obvious here?
Comment