Page 1 of 1

Rotating rigibody

Posted: Fri Aug 31, 2012 8:37 am
by saneeshnair
I have a cube and an inclined plane. I applied force to the cube and translated it to the top of inclined plane. Now I need to rotate this cube.


Code: Select all

m_turnAngle -= 0.017453293;
btTransform xform;
xform.setRotation (btQuaternion (btVector3(0.0, 0.0, 1.0), m_turnAngle));
m_cube->getMotionState()->setWorldTransform (xform);
m_cube->setCenterOfMassTransform (xform);	
But this code will make the cube collide with slope.

What should I do?

Many Thanks,
Saneesh