collision point determination

Post Reply
mirv
Posts: 19
Joined: Tue Jun 20, 2006 7:13 am

collision point determination

Post by mirv »

Hello,
I'm using only the collision detection side of Bullet (not the dynamics - I'm moving stuff manually), and I'm coming across an odd little problem - it detects collisions, but the "PersistentManifold" is reporting no contact points after a call to "RefreshContactPoints" unless the two objects are entirely overlapping. To make things clearer: I have two boxes (A and B) and collision is detected, but no collision points are given unless (in this case) B is entirely inside of A. If I don't call RefreshContactPoints, then a single contact point is given as the centre of each box, no matter where they actually overlap, but it does give one when there is any collision.

I hope that outlines my little problem - I'm using Bullet 1.8 (release compile on vc++ express). The code is based almost entirely from the CollisionInterface demo - I'm seeing similar results in that as well. Any help would be greatly appreciated!
Thanks!
mirv
Posts: 19
Joined: Tue Jun 20, 2006 7:13 am

Post by mirv »

And just to add confusion for myself - I can't seem to get any collision points at all using SimpleBroadphase instead of AxisSweep3. Of course that works just fine with CcdPhysicsEnvironment, so I'm probably doing something wrong somewhere. Will post when I find out what!
Noehrgel
Posts: 10
Joined: Mon Aug 21, 2006 5:11 am

Post by Noehrgel »

Late, but a solution I found today:
Using a debugger I found that the overlapping pairs cache wasn't set up properly which led me to calling RefreshOverlappingPairs right in front of PerformDiscreteCollisionDetection. This seems to do the trick.
Maybe someone with more understanding might give a hint why this isn't done in the demos?

edit:
well, my "solution" seems just to work for a simple case with two boxes crossing their way. A more advanced example doesn't work. If someone with more background than me is interested in solving this issue send me a message.
Post Reply