Hello,
So I've been working on integrating bullet into my engine. My rendering engine uses glRotate to rotate the geometry, which works fine. Only thing is, when something is rotated, because the rigid body is linked to the geometry, it needs to rotate in the same way. I know how glRotate works, but I have no idea how bullet handles its rotations, as far as if its in radians, etc.
Heres what I did for my translations, and I'm pretty sure you can use setRotation() to do rotations, but I'm not exactly sure how. Does anyone have any ideas? They would be much appreciated.
position = newPos;
//we need to update the rigidbody, if we have one
if (parent->hasComponent(CCollisionI))
{
CCollision* c = (CCollision*)parent->getComponent(CCollisionI);
btMotionState* m = c->rigidBody->getMotionState();
delete m;
btTransform t;
t.setIdentity();
t.setOrigin(btVector3(newPos.x,newPos.y,newPos.z));
btMotionState* motionStatePlane = new btDefaultMotionState(t);
c->rigidBody->setMotionState(motionStatePlane);
}