From 89c0170c6b8e7b9a813cda57bbdfb750d1142228 Mon Sep 17 00:00:00 2001 From: Joseph Mirabel <jmirabel@laas.fr> Date: Wed, 28 Aug 2019 12:00:56 +0200 Subject: [PATCH] [GJK] SimplexV.d is not normalized. --- src/narrowphase/gjk.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/narrowphase/gjk.cpp b/src/narrowphase/gjk.cpp index 86ef02e9..af596e66 100644 --- a/src/narrowphase/gjk.cpp +++ b/src/narrowphase/gjk.cpp @@ -419,9 +419,9 @@ GJK::Status GJK::evaluate(const MinkowskiDiff& shape_, const Vec3f& guess) void GJK::getSupport(const Vec3f& d, bool dIsNormalized, SimplexV& sv) const { - if (dIsNormalized) sv.d = d; - else sv.d.noalias() = d.normalized(); - shape.support(sv.d, true, sv.w); + // Was sv.d.noalias() = d.normalized(); + sv.d.noalias() = d; + shape.support(sv.d, dIsNormalized, sv.w); } void GJK::removeVertex(Simplex& simplex) -- GitLab