I would like to rotate a mesh first 22.5°around the Z axis and then 90° around the Y axis. I tried this code:
Code: Select all
mesh->setRotation(irr::core::vector3df(0.0f, 90.0f, 22.5f));
The problem is that this rotates first around the Y axis and then around the Z axis, which is, if I'm not wrong, the same thing as rotating first 22.5°around the X axis and then 90° around the Y axis. So I tried this code:
Code: Select all
mesh->setRotation(irr::core::vector3df(22.5f, 90.0f, 0.0f));
But this rotates first around the X axis and then around the Z axis, giving a similar effect. It seems like the setRotation method rotates the mesh first around the X axis, then the Y axis, then the Z axis. So how can I achieve what I want to do?