From 631048668f1d93563f60b54dfd25e5cce239f8b4 Mon Sep 17 00:00:00 2001 From: Irlan <-> Date: Wed, 16 May 2018 16:21:20 -0300 Subject: [PATCH] account for raddi in simplified sphere vs. hull test --- src/bounce/dynamics/shapes/hull_shape.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bounce/dynamics/shapes/hull_shape.cpp b/src/bounce/dynamics/shapes/hull_shape.cpp index cb43a13..0521a05 100644 --- a/src/bounce/dynamics/shapes/hull_shape.cpp +++ b/src/bounce/dynamics/shapes/hull_shape.cpp @@ -374,7 +374,7 @@ bool b3HullShape::TestSphere(b3TestSphereOutput* output, const b3Sphere& sphere, if (maxIndex != ~0) { - output->separation = maxSeparation; + output->separation = maxSeparation - radius; output->normal = b3Mul(xf.rotation, m_hull->GetPlane(maxIndex).normal); return true; }