btPairCachingGhostObject convexSweepTest Problem

Enlight
Posts: 8
Joined: Tue May 05, 2009 8:35 pm

btPairCachingGhostObject convexSweepTest Problem

Post by Enlight »

Hi, I'm working with my own Kinematic Character controller based on the bullet 2.7.4 implementation.
I have an height map and many btBvhTriangleMesh shapes over the terrain.
I'm using btPairCachingGhostObject for the convex sweep tests and the problem is that, in certain conditions, the convex sweep does not detect correctly collisions, that is , returns 0 hits when actually there is an object to collide with.

The problem was solved by changing:

Code: Select all

m_ghostObject->convexSweepTest (...)
to

Code: Select all

m_world->convexSweepTest(...)
m_world is a btCollisionWorld. I think the btPairCachingGhostObject fails at some point to collect the corresponding collision pairs that may occur with the object motion (sweep test). I'm afraid that using m_world instead of the ghost object may produce a performance penalty.

Is there any way I can tell bullet, to collect collision pairs in the ghost object based on the aabb that encompasses the object's motion?

Thanks in advance.