# Rotation Matrix

i am having a hard time trying to dechiper how blender game engine allocate the rotation values on the rotation Matrix, this website describes the values like this.

But when i print the rotation matrix on the console it give me weird positions

That value 0.766 should be on the first column first row where the 1.0 value is, that value should describe the rotation on x. Plz halp :c.

## 1 Answer

You rotated the object around the X-axis. In other words it is a rotation on the YZ-plane.

The projection on the X-axis (rotation axis) will remain unchanged, regardless how much you turn the object. It was (0,0,0) and is still (0,0,0).

Hint: the rotation axis does not change.

The rotation is a 2D-rotation on the YZ-plane. Here you can see the formulas you might remember from school:

$$x = \sin(\alpha)$$ $$y = \cos(\alpha)$$

As we have a plane, we can use a 2D rotation matrix:

$$\begin{bmatrix} \cos(\alpha) & -\sin(\alpha)\\ \sin(\alpha) & \cos(\alpha) \end{bmatrix} \begin{bmatrix} y\\ z\\ \end{bmatrix}$$

One component is y the other is z.

• Sorry, i figured out this like a week ago, yes that was my bad xD, i need to rotate around z axis. Thx a lot :) Feb 21, 2018 at 0:04