Need to translate a Rotation Matrix to Rotation y, x, z OpenGL & Jitter for 3D Game
- by MineMan287
I am using the Jitter Physics engine which gives a rotation matrix:
M11 M12 M13
M21 M22 M23
M21 M32 M33
And I need it so OpenGL can use it for rotation
GL.Rotate(xr, 1, 0, 0)
GL.Rotate(yr, 0, 1, 0)
GL.Rotate(zr, 0, 0, 1)
Initially I Tried
xr = M11
yr = M22
zr = M33
[1 0 0]
[0 1 0]
[0 0 1]
Which did not work, please help, I have been struggling on this for days :(
Re-Edit
The blocks are stored in text files with Euler angles so it needs to be converted or the rendering engine will simply fail.
I am now using the matrix in the text files.
Example Block
1,1,1 'Size
0,0,0 'Position
255,255,255 'Colour
0,0,0,0,0,0,0,0,0 'Rotation Matrix