I am setting a body to be kinematic object and trying to set its motion. But I am not able to make it move at all. This is the code I have to try and make it move
Code: Select all
void GameObject::Update()
{
if(m_Body->isKinematicObject())
{
btVector3 translate(5.0f, 0.0f, 0.0f);
m_Body->translate(translate);
}
float m[16];
btDefaultMotionState *state = static_cast<btDefaultMotionState *>(m_Body->getMotionState());
state->m_graphicsWorldTrans.getOpenGLMatrix(m);
m_Model->SetTransform(m);
}
Thanks
Gautam