Hi !
How do I rotate a scenenode? If I do
node = smgr->addAnimatedMeshSceneNode
I can set the position by calling
node->setPosition
but calling
node->setRotation
simply doesn't change anything. All my testfaeries always look in the same direction. By the way, they also do this in all the examples ...
So how can I rotate such a thing?
rotate or not rotate ...
rotate or not rotate ...
2D-Splatter-Action => http://www.walkover.de.vu <=
I use
scenenode->setRotation(core::vector3df(a,b,c));
where the a,b,c are the angles around x,z, and again x axes, if nikos code applies to to standards. For me, I just pluged the angels in the different position until it went right.
The angels have to be in degrees, so from 0-360 instead of from 0-2*PI. If u use the later ones in your internal code, u have to mulitply them by 180/PI.
For some reason this didn't work for me for the camera. There I used
camera->setTarget(core::vector3df(x,z,y));
where (x,y,z) is the point where the camera is looking at. I calculated a point with distance 100 away from the camera position and in the direction where I want to look by again 3 angles.
And there is x,z,y because i don't like the coordinate system of irrlicht. I prefer having the first 2 components the walking plane und the 3rd one the height. But that's just my opinion.
scenenode->setRotation(core::vector3df(a,b,c));
where the a,b,c are the angles around x,z, and again x axes, if nikos code applies to to standards. For me, I just pluged the angels in the different position until it went right.
The angels have to be in degrees, so from 0-360 instead of from 0-2*PI. If u use the later ones in your internal code, u have to mulitply them by 180/PI.
For some reason this didn't work for me for the camera. There I used
camera->setTarget(core::vector3df(x,z,y));
where (x,y,z) is the point where the camera is looking at. I calculated a point with distance 100 away from the camera position and in the direction where I want to look by again 3 angles.
And there is x,z,y because i don't like the coordinate system of irrlicht. I prefer having the first 2 components the walking plane und the 3rd one the height. But that's just my opinion.
2D-Splatter-Action => http://www.walkover.de.vu <=
no, my a,b,c are the absolute rotations coming from my AI-code. Otherwise u have to add rotation instead of just setting it.
2D-Splatter-Action => http://www.walkover.de.vu <=
