Why would btManifoldPoint ever have getDistance() > 0?

Spaddlewit
Posts: 28
Joined: Fri Sep 04, 2009 8:23 pm

Why would btManifoldPoint ever have getDistance() > 0?

Post by Spaddlewit »

Why would btManifoldPoint ever have a getDistance() result of > 0? Wouldn't that mean a collision didn't occur? getDistance() indicates the penetration depth of the two objects, right?

Yet I do receive btManifoldPoints that have getDistance() > 0.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: Why would btManifoldPoint ever have getDistance() > 0?

Post by Erwin Coumans »

Contact points can have a positive distance.

The Bullet constraint solver can deal with contacts with positive distances, also known as speculative contacts. Contacts with positive distance can be used to avoid missing collisions and help improve resting stability.