I apologize if this is a bit newbish, but I'm having trouble with my rotation.
I'm integrating bullet into a game engine that uses euler XYZ rotation for it's objects..
What I'm trying to do, is write code that fetches the rotation from a bullet body in the world, to update the display object in the engine. And another bit of code, that can update the rotation of the bullet body, if the display object is changed directly.
Here's what I'm doing to fetch the rotation from the body...
m.getEulerZYX(rot, rot, rot);
return glm::vec3(glm::degrees(rot), glm::degrees(rot), glm::degrees(rot));
And to change the rotation,
t.setRotation(btQuaternion(glm::radians(z), glm::radians(y), glm::radians(x)));
Is there anything obviously wrong with this? What happens, is that when I change the rotation, it seems to "jump", and never quite end up what I'm expecting.