aboutsummaryrefslogtreecommitdiff
path: root/PhysX_3.4/Source/GeomUtils/src/GuRaycastTests.cpp
diff options
context:
space:
mode:
authorSheikh Dawood Abdul Ajees <[email protected]>2018-02-12 15:31:42 -0600
committerSheikh Dawood Abdul Ajees <[email protected]>2018-02-12 15:31:42 -0600
commit52dae55c0c65f42caffa9d803be27be44ac4b8a3 (patch)
treec2fa77a97691d026593fe6aa45f1a56389fc5c70 /PhysX_3.4/Source/GeomUtils/src/GuRaycastTests.cpp
parentPhysX 3.4, APEX 1.4 patch release @23472123 (diff)
downloadphysx-3.4-52dae55c0c65f42caffa9d803be27be44ac4b8a3.tar.xz
physx-3.4-52dae55c0c65f42caffa9d803be27be44ac4b8a3.zip
PhysX 3.4, APEX 1.4 patch release @23576764
Diffstat (limited to 'PhysX_3.4/Source/GeomUtils/src/GuRaycastTests.cpp')
-rw-r--r--PhysX_3.4/Source/GeomUtils/src/GuRaycastTests.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/PhysX_3.4/Source/GeomUtils/src/GuRaycastTests.cpp b/PhysX_3.4/Source/GeomUtils/src/GuRaycastTests.cpp
index fa7056ad..086d4ca2 100644
--- a/PhysX_3.4/Source/GeomUtils/src/GuRaycastTests.cpp
+++ b/PhysX_3.4/Source/GeomUtils/src/GuRaycastTests.cpp
@@ -487,6 +487,12 @@ PxU32 raycast_heightField(GU_RAY_FUNC_PARAMS)
PxBounds3 hfLocalBounds;
hfUtil.computeLocalBounds(hfLocalBounds);
+ // PT: inflate the bounds like we do in the scene-tree (see PX-1179)
+ const PxVec3 center = hfLocalBounds.getCenter();
+ const PxVec3 extents = hfLocalBounds.getExtents() * 1.01f; //SQ_PRUNER_INFLATION;
+ hfLocalBounds.minimum = center - extents;
+ hfLocalBounds.maximum = center + extents;
+
PxVec3 localImpact;
PxReal t; // closest intersection, t==0 hit inside
PxU32 rval = rayAABBIntersect2(hfLocalBounds.minimum, hfLocalBounds.maximum, localRayOrig, localRayDir, localImpact, t);