ContactPenetrationDepth Property |
Namespace: DigitalRune.Geometry.Collisions
This is the distance which the two object have to move along the contact normal (see Normal) to be in a touching state (no penetration and no separation). For penetrating contacts this value is positive. For separated objects this value is negative. (The "penetration depth" is the inverse of the "separation distance".)
For ray-casting: If this value is positive, the ray hits the object and the PenetrationDepth is the distance from the origin of the ray origin to the contact point. If the value is negative the ray misses the object and the absolute value of the PenetrationDepth indicates the separation distance between the ray and the other object (closest points).