I was setting my btCollisionObject position this way:
Code: Select all
btTransform world_transform = btTransform();
btVector3 pos = btVector3();
pos.setX( myPlayer->feet_position().X );
pos.setY( myPlayer->feet_position().Y );
pos.setZ( myPlayer->feet_position().Z );
world_transform.setOrigin( pos );
m_player_collider_objects[ i ]->setWorldTransform( world_transform );
After few code digging I've change the piece of code above to this:
Code: Select all
m_player_collider_objects[ i ]->getWorldTransform().setOrigin( btVector3( myPlayer->feet_position().X,
myPlayer->feet_position().Y,
myPlayer->feet_position().Z) );
If there is nothing wrong with my first piece of code (I don't see anything actually bad with it), I would suggest a unit test (if there is) because I think it's a bug.
Any word about this? Do you want I log this in the github or it's normal?