From 8f550d5f8ce5c12dae432a6d40e554e599316b0d Mon Sep 17 00:00:00 2001 From: rextimmy Date: Tue, 10 Jun 2014 21:27:17 +1000 Subject: [PATCH] Changed method of releasing a physics body with physx 2.8 --- Engine/source/T3D/physics/physx/pxWorld.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Engine/source/T3D/physics/physx/pxWorld.cpp b/Engine/source/T3D/physics/physx/pxWorld.cpp index c4f33a21d..0ec3d7fea 100644 --- a/Engine/source/T3D/physics/physx/pxWorld.cpp +++ b/Engine/source/T3D/physics/physx/pxWorld.cpp @@ -448,9 +448,8 @@ void PxWorld::releaseActor( NxActor &actor ) // Clear the userdata. actor.userData = NULL; - // If the scene is not simulating then we have the - // write lock and can safely delete it now. - if ( !mIsSimulating ) + // actors are one of the few objects that are stable removing this way in physx 2.8 + if (mScene->isWritable() ) { mScene->releaseActor( actor ); }