From 78cab22a61786a23f2ee1ad7c5dcbec0024befca Mon Sep 17 00:00:00 2001 From: Sheikh Dawood Abdul Ajees Date: Tue, 27 Nov 2018 13:02:50 -0600 Subject: PhysX 3.4, APEX 1.4 patch release @25256367 --- PhysX_3.4/Source/SimulationController/src/ScShapeSim.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'PhysX_3.4/Source/SimulationController/src/ScShapeSim.cpp') diff --git a/PhysX_3.4/Source/SimulationController/src/ScShapeSim.cpp b/PhysX_3.4/Source/SimulationController/src/ScShapeSim.cpp index 8b07c702..c736b3d8 100644 --- a/PhysX_3.4/Source/SimulationController/src/ScShapeSim.cpp +++ b/PhysX_3.4/Source/SimulationController/src/ScShapeSim.cpp @@ -267,7 +267,17 @@ void Sc::ShapeSim::onFlagChange(PxShapeFlags oldFlags) if(oldBp != newBp) { if(!oldBp && newBp) - internalAddToBroadPhase(); + { + // A.B. if a trigger was removed and inserted within the same frame we need to reinsert + if(hasTriggerFlags(newFlags) && getScene().getAABBManager()->isMarkedForRemove(getElementID())) + { + reinsertBroadPhase(); + } + else + { + internalAddToBroadPhase(); + } + } else internalRemoveFromBroadPhase(); } -- cgit v1.2.3