Bullet integration question

hahanoob
Posts: 3
Joined: Sun Jun 14, 2009 8:34 pm

Bullet integration question

Post by hahanoob »

Is there any way to force bullet to call the motion state getWorldTransform every frame other than setting the body to be kinematic? I had assumed bullet would always read the current worldTransform, apply forces, and then write it back.

Right now I with my home rolled physics I can just say something like playerEntity.setWorldTransform(). Now it seems like I'm going to have to do something silly like:

Code: Select all

if(playerEntity.hasPhysics())
{
  playerEntity.getPhysics().setWorldTransform();
}
else
{
  playerEntity.setWorldTransform();
}