Commit c9292413 authored by Joseph Mirabel's avatar Joseph Mirabel
Browse files

Fix calculation of normal in GJKSolver::shapeDistance

parent 7a9f09c7
......@@ -275,9 +275,7 @@ namespace fcl
epa.getClosestPoints (shape, w0, w1);
assert (epa.depth >= -eps);
distance = (std::min) (0., -epa.depth);
// TODO should be
// normal = tf1.getRotation() * epa.normal;
normal = tf2.getRotation() * epa.normal;
normal = tf1.getRotation() * epa.normal;
p1 = p2 = tf1.transform(w0 - epa.normal*(epa.depth *0.5));
return false;
}
......
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