yes, but thats what you want ...global rotation of your plane made of two combined rotations. Irrlicht use Euler angles to represent rotation which basicly mean that if you say:
Code: Select all
node->setRotation(vector3df(10,20,30))
node is firsth rotated 10 degrees around X axis ...not only node but its axes along with it. Then 20 degree rotation is caried around Y axis ...which was already rotated by pervious rotation and 30 degree rotation is caried last around Z axis ...which was of course already rotated twice by pervious rotations. (I am not entirely sure obout order of rotations irrlicht use, can be Z->Y->X)
What you want to acomplish is firsth to rotate your planet (10,20,30) ...which let say is planet axis rotation and then rotate it by say 40 degrees around its Y axis (your animation) which would be rotation (0,40,0).
Firsth thing to come in mind is that you simply add 20 + 40 on place of Y rotation: node->setRotation(vector3df(10, 20+40=60, 30))
But that is entirely wrong. If you read what I wrote about Euler angles you see that to rotate (10,60,30) is not the same as if you would firsth rotate (10,20,30) and then add (0,40,0) rotation. This can be done by creating two rotation matrices, then multiply them. You can acomplish the same using quaternions.