btKinematicCharacterController

codemasterpl
Posts: 4
Joined: Fri May 27, 2011 12:23 pm
Location: Europe

btKinematicCharacterController

Post by codemasterpl »

Can somebody please help me out finding why my btKinematicCharacterController, does not 'apply' any force to other rigidbodies around?

This is exactly what i am talking about:

http://www.youtube.com/watch?v=PmwEWEHKEbg



We would like our player to react with other bodies not only 'collide' - our player can't even move a lamp, with a mass of 1, not even mentioning - he can't move anything.


This is how character is made:

Code: Select all

							btTransform startTransform;
							startTransform.setIdentity ();
							startTransform.setOrigin (btVector3(newPosition.x,newPosition.y,newPosition.z));
 							newActor.m_ghostObject = new btPairCachingGhostObject();
							newActor.m_ghostObject->setWorldTransform(startTransform);

							Game->Physics()->m_broadphase->getOverlappingPairCache()->setInternalGhostPairCallback(new btGhostPairCallback());
							btScalar characterHeight=newActor.a_Model.getModel()->modelSize.y;
							btScalar characterWidth =newActor.a_Model.getModel()->modelSize.x;
							btConvexShape* capsule = new btCapsuleShape(characterWidth,characterHeight);
							newActor.m_ghostObject->setCollisionShape (capsule);
							newActor.m_ghostObject->setCollisionFlags (btCollisionObject::CF_CHARACTER_OBJECT  );

							btScalar stepHeight = btScalar(0.35);
							newActor.m_character = new btKinematicCharacterController (newActor.m_ghostObject,capsule,stepHeight);

							Game->Physics()->getDynamic()->addCollisionObject(newActor.m_ghostObject,X::XCollisionGroups::PLAYERS,X::XCollidesWith::WITH_EVERYTHING);								
							Game->Physics()->getDynamic()->addAction(newActor.m_character);
						 

codemasterpl
Posts: 4
Joined: Fri May 27, 2011 12:23 pm
Location: Europe

Re: btKinematicCharacterController

Post by codemasterpl »

Well i found:

"Interaction between btKinematicCharacterController and dynamic rigid bodies needs to be explicity implemented by the user."

in specs, which is pathetic.

Anyone can point me the right direction here?