I'm relatively new to bullet (3 or 4 weeks, I think ), and I've got some Problems while using btKinematicCharacterController.
With this Code:
Code: Select all
auto pShape = new btCapsuleShape(10,10);
m_pGhostObject = new btPairCachingGhostObject();
m_pGhostObject->setWorldTransform(btTransform(btMatrix3x3::getIdentity(), btVector3(0,30,0)));
m_pGhostObject->setCollisionShape(pShape);
m_pGhostObject->setCollisionFlags(m_pGhostObject->getCollisionFlags()|btCollisionObject::CF_CHARACTER_OBJECT);
m_pCharacterController = new btKinematicCharacterController(m_pGhostObject, pShape, 0.1, 1);
m_pDynamicsWorld->addCollisionObject(m_pGhostObject, btBroadphaseProxy::CharacterFilter, btBroadphaseProxy::StaticFilter|btBroadphaseProxy::DefaultFilter);
m_pDynamicsWorld->addAction (m_pCharacterController);
Code: Select all
// btKinematicCharacterController.cpp line 87
hitNormalWorld = m_hitCollisionObject->getWorldTransform().getBasis()*convexResult.m_hitNormalLocal;
What's going wrong, and what can I do to get this Working ?
Sincerely,
E333