How to get the Euler rotation of a rigid body between 0 to 360 in Bullet Physics?
I am currently trying to get the rotation of an object. I am using C++ and Bullet Physics. This is my code: btScalar x, y, z; body[0]->getCenterOfMassTransform().getBasis().getEulerZYX(z, y, x); However, as I rotate the object around clockwise the number I get from the y (y is vertical in Bullet) axis goes from 0 to -90 to 0 to 90 and finally back to 0 for every quarter rotation. It is close but what I need is for it to go all the way from 0 to 360. Bullet documentation says: void getEulerZYX (btScalar &yaw, btScalar &pitch, btScalar &roll, unsigned int solution_number=1) const and solution