Ghost and ContactPoint

noon
Posts: 6
Joined: Wed Jun 01, 2011 1:05 am

Ghost and ContactPoint

Post by noon »

Hello,

I'm using Ghosts as described in the wiki : http://bulletphysics.org/mediawiki-1.5. ... hostObject
I also initialize the world with this :

Code: Select all

m_Broadphase->getOverlappingPairCache()->setInternalGhostPairCallback(new btGhostPairCallback());
I get the right results when calling this :

Code: Select all

btBroadphasePairArray& pairArray = ghostObject->getOverlappingPairCache()->getOverlappingPairArray();
But I don't get any contact points because collisionPair->m_algorithm is NULL :

Code: Select all

 if (collisionPair->m_algorithm)
            collisionPair->m_algorithm->getAllContactManifolds(manifoldArray);
Any idea ?

Thanks
Kanttori
Posts: 38
Joined: Thu Jul 08, 2010 12:52 am

Re: Ghost and ContactPoint

Post by Kanttori »

Hi!

Maybe you're using concave trimeshes? In that case I think you need to use GIMPACT (MovingConcaveDemo) or replace your shape with a convex one like one of the primitives or a convex hull.