summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerwincoumans <erwincoumans@google.com>2021-11-18 19:45:26 -0800
committerGitHub <noreply@github.com>2021-11-18 19:45:26 -0800
commit946d500c8e068a88eb56ef98499983412be4d22c (patch)
treec85afd968f8a39c0d83e20d9c92684ae2deb72a5
parent10f72b9b5d37f66b5ce497a9818fb765974ab200 (diff)
parent2045f04f3c807c0760433c9e4b3d4fb5092ecce7 (diff)
downloadbullet3-946d500c8e068a88eb56ef98499983412be4d22c.tar.gz
Merge pull request #3848 from nekomatata/heightmap-early-exit
Fix early exit in heightfield raycast
-rw-r--r--src/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.cpp b/src/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.cpp
index 01bf7f67f..5b1c23d6f 100644
--- a/src/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.cpp
+++ b/src/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.cpp
@@ -828,6 +828,7 @@ void btHeightfieldTerrainShape::performRaycast(btTriangleCallback* callback, con
{
// Don't use chunks, the ray is too short in the plane
gridRaycast(processTriangles, beginPos, endPos, &indices[0]);
+ return;
}
ProcessVBoundsAction processVBounds(m_vboundsGrid, &indices[0]);