I have the following situation. I have a sphere object, a football as a matter of fact, which is controlled by its own physics algorithm.
Once the ball is out of bounds of the field, I want Bullet to take over.
The problem I am having is that my object is a dynamic object, but I cannot move it around as I need. I managed to move it using:
Code: Select all
btVector3 vTmp = btVector3(tWorldPhysicsData::pvectorTobtVector(m_vPosition));
btTransform trans;
trans.getIdentity();
trans.setOrigin(vTmp);
if (m_Shape == BT_COLLISION_SPHERE)
{
//((btRigidBody*)m_pBTCollisionObject)->getMotionState()->setWorldTransform(trans);
m_pBTCollisionObject->setWorldTransform(trans);
}
Any help with this? Or any ideas on how I can do this differently.
The main hope is that Bullet can manage the nets for me. Should I rather use a Kinematic object?
Thanks in advance