Kinematic Character isn't interacting with dynamic objects
Posted: Thu Dec 20, 2012 3:51 am
according to here: http://code.google.com/p/bullet/source/detail?r=1457 bullet should support collisions between btKinematicCharacterController and dynamic objects however when my character comes into contact with dynamic objects it does one of two things:
1. goes right through the object
2. walks over the object
it doesn't push objects as I would expect it to
this is how I set it up:
is there anything I'm missing that might cause this behavior?
1. goes right through the object
2. walks over the object
it doesn't push objects as I would expect it to
this is how I set it up:
Code: Select all
btTransform startTransform;
startTransform.setIdentity ();
startTransform.setOrigin (btVector3(0, 0, 0));
btConvexShape* capsule = new btCapsuleShape(width, height);
m_ghostObject = new btPairCachingGhostObject();
m_ghostObject->setWorldTransform(startTransform);
broadphase->getOverlappingPairCache()->setInternalGhostPairCallback(new btGhostPairCallback());
m_ghostObject->setCollisionShape(capsule);
m_ghostObject->setCollisionFlags(btCollisionObject::CF_CHARACTER_OBJECT);
charCon = new btKinematicCharacterController (m_ghostObject, capsule, stepheight);
charCon->setGravity(-dynamicsWorld->getGravity().getY());
dynamicsWorld->addCollisionObject(m_ghostObject, btBroadphaseProxy::CharacterFilter, btBroadphaseProxy::AllFilter);
dynamicsWorld->addAction(charCon);