Commit 2e3d0640 authored by isucan's avatar isucan
Browse files

Merge pull request #14 from dartsim/master

Fix bug: sphereSphereIntersect calculates wrong contact point
parents 148c3d91 0b8fcac7
......@@ -150,7 +150,7 @@ bool sphereSphereIntersect(const Sphere& s1, const Transform3f& tf1,
}
if(contact_points)
*contact_points = tf1.transform(Vec3f()) + diff * 0.5;
*contact_points = tf1.transform(Vec3f()) - diff * s1.radius / (s1.radius + s2.radius);
return true;
}
......
Supports Markdown
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