If you were trying to make flight or car simulator than you probably encoutered problem with setRotation() function. It uses so caled Euler angles. Here is way hove to get rid of it using matrix4 class. When writing this code I was largely inspired by Steve Baker's article at http://sjbaker.org/steve/omniv/eulers_are_evil.html
vector3df r = node->getRotation(); //get current rotation (euler)
matrix4 m;
m.setRotationDegrees(r); //set firsth matrix to current rotation
//use one you need:
vector3df rp = vector3df(angle,0,0); //pitch
//vector3df rp = vector3df(0,angle,0); //turn
//vector3df rp = vector3df(0,0,angle); //roll
matrix4 mp;
mp.setRotationDegrees(rp); //set second matrix to rotation to add
m *= mp; //multipy them
r = m.getRotationDegrees(); //get rotation vector from matrix (euler)
node->setRotation(r); //rotate node
well ..ti wasn't my intention, its just some stupid mistake I overlooked when copy and paste from diferent file and than repeated throught same metod again and again...
I decided to edit firsth post since originaly it was bit confusing...
hey, i know i've been bugging you on the forums, but let me ask you question
using your code from this post, my character which i call from animatedmeshscenenode->getmesh(),
he rotates relatively. what i mean by this is, when i look at him he doesn't stay put and rotate, he moves around in a circle. Using the getposition and printing the information out, it stays the same, but its obvious he isn't in the same position. How would i adjust this code to make him turn around himself. I have a camera node as well.