Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'extern/bullet/Bullet/NarrowPhaseCollision/ContinuousConvexCollision.cpp')
-rw-r--r--extern/bullet/Bullet/NarrowPhaseCollision/ContinuousConvexCollision.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/extern/bullet/Bullet/NarrowPhaseCollision/ContinuousConvexCollision.cpp b/extern/bullet/Bullet/NarrowPhaseCollision/ContinuousConvexCollision.cpp
index 21baabfb864..2369b02b1b9 100644
--- a/extern/bullet/Bullet/NarrowPhaseCollision/ContinuousConvexCollision.cpp
+++ b/extern/bullet/Bullet/NarrowPhaseCollision/ContinuousConvexCollision.cpp
@@ -120,13 +120,18 @@ bool ContinuousConvexCollision::calcTimeOfImpact(
lambda = lambda + dLambda;
+ if (lambda > 1.f)
+ return false;
+
+ if (lambda < 0.f)
+ return false;
+
//todo: next check with relative epsilon
if (lambda <= lastLambda)
break;
lastLambda = lambda;
- if (lambda > 1.f)
- return false;
+
//interpolate to next lambda
SimdTransform interpolatedTransA,interpolatedTransB,relativeTrans;