What I have tried so far, is to use the body's setWorldTransform() function. For example:
Code: Select all
glm::mat4 pose;
pose[3][0] = 0.5;
pose[3][1] = 2.0;
pose[3][2] = 1.0;
btTransform new_transform;
new_transform.setFromOpenGLMatrix((float*)&pose[0]);
my_body->setWorldTransform(new_transform);
Code: Select all
btTransform trans = my_body->getWorldTransform();
std::cout << "Y = " << trans.getOrigin().getY() << std::endl;
Please can somebody explain the different between the motion state, and the world transform, and how I should go about manually updating the pose of a kinematic object?