What is the correct method to get the transformation matrix in Irrlicht from yaw, pitch and roll values? For example, there are methods such as D3DXMatrixRotationYawPitchRoll ( matrix , yaw, pitch , roll ) ;
And how to apply it to the camera? Something like matrix.transform ( ) ? What are the analogues in Irrlicht?

Also, any solutions will be interesting: on ogre, directx, pure opengl, delta3d.

    1 answer 1

    In essence, these are simply successive rotations of a coordinate system around all axes (one for each) superimposed on each other (i.e. rotations are made around axes that have already been rotated by previous turns):

    • First around the vertical axis (on yaw )
    • Then around the horizontal axis lying in the plane of the camera (on the pitch )
    • Then around the axis of the camera direction (on roll )

    In Irrlicht, there is a irr::core::CMatrix4 method for matrices ( irr::core::CMatrix4 ), most likely, it accepts directly a vector from these three angles in radians, and for the camera there is just setRotation .


    Documentation weakly reveals the mathematical meaning of the arguments, but such a set of angles is a very common way to set a turn. The compilers apparently found this point obvious. Try it.