c++ - How to get the Euler rotation of a rigid body between 0 to 360 in Bullet Physics? -
i trying rotation of object. using c++ , bullet physics. code:
btscalar x, y, z; body[0]->getcenterofmasstransform().getbasis().geteulerzyx(z, y, x);
however, rotate object around clockwise number y (y vertical in bullet) axis goes 0 -90 0 90 , 0 every quarter rotation. close need go way 0 360.
bullet documentation says:
void geteulerzyx (btscalar &yaw, btscalar &pitch, btscalar &roll, unsigned int solution_number=1) const
and
solution_number solution of 2 possible solutions ( 1 or 2) possible values
this because euler angles ambigous. have tried solution 2?
Comments
Post a Comment