Commit 68e14b69 authored by Joseph Mirabel's avatar Joseph Mirabel
Browse files

Fix ShapeShapeCollide

parent 3a4dc1c5
......@@ -85,10 +85,10 @@ std::size_t ShapeShapeCollide(const CollisionGeometry* o1, const Transform3f& tf
if (distance <= 0) {
if (result.numContacts () < request.num_max_contacts) {
const Vec3f& p1 = distanceResult.nearest_points [0];
assert (!request.enable_contact || p1 == distanceResult.nearest_points [1]);
const Vec3f& p2 = distanceResult.nearest_points [1];
Contact contact (o1, o2, distanceResult.b1, distanceResult.b2,
p1,
(p1+p2)/2,
distanceResult.normal,
-distance+request.security_margin);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment