Kinematic objects not colliding with GhostObjects

aymar.fisherman
Posts: 9
Joined: Mon Jul 04, 2011 6:18 pm

Kinematic objects not colliding with GhostObjects

Post by aymar.fisherman »

I have some kinematic objects in my code, and also, some characters (represented as GhostObjects). The characters are being included in the DynamicsWorld as:

Code: Select all

PhysicsManager::getInstance()->getDynamicsWorld()->addCollisionObject( 
ghostObject, btBroadphaseProxy::CharacterFilter, btBroadphaseProxy::AllFilter 
);
PhysicsManager::getInstance()->getDynamicsWorld()->addAction( controller );
And the kinematic objects are being created with these lines:

Code: Select all

kinematicBody->setCollisionFlags( kinematicBody->getCollisionFlags() | btCollisionObject::CF_KINEMATIC_OBJECT );
kinematicBody->setActivationState( DISABLE_DEACTIVATION );
Well, I'm tracking the collisions of the kinematic objects for each frame and for a given path (like continuous collision detection). So I'm using the DynamicsWorld::convexSweepTest, and the callback I'm instantiating receives the btBroadphaseProxy::AllFilter for both the filter group and the filter mask.

Finally, the problem that I'm facing is that, when the GhostObject is moving (active) the kinematic objects collides perfectly with'em, but when the GhostObject has stopped moving, the kinematic objects just pass through them, they only collide with the stuff beyond the GhostObject (like the static scenario object).

Can anybody help me solve this issue?

Thanks in advance,

Aymar.