I have some problems with the conversion to euler angles.
I created a box and apply an agular velocity.
This is my code for conversion :
Code: Select all
Body->setAngularVelocity(btVector3(0,1,0));
btTransform t;
Body->getMotionState()->getWorldTransform(t);
btMatrix3x3 m(t.getRotation());
btVector3 v;
m.getEulerYPR(v[0],v[1],v[2]);
//..
std::cout << v[0] << "," << v[1] << "," << v[2] << endl;
I should have the following values :
X = 0
Y = [-180 ; 180] ( between -180 and 180 )
Z = 0
But i have this :
X = {0 ; 180} ( 0 or 180 )
Y = [-90 ; 90] ( between -90 and 90 )
Z = {0 ; 180} ( 0 or 180 )
Please, help me.
