Changed method of releasing a physics body with physx 2.8

This commit is contained in:
rextimmy 2014-06-10 21:27:17 +10:00
parent d0a64026b0
commit 8f550d5f8c

View file

@ -448,9 +448,8 @@ void PxWorld::releaseActor( NxActor &actor )
// Clear the userdata. // Clear the userdata.
actor.userData = NULL; actor.userData = NULL;
// If the scene is not simulating then we have the // actors are one of the few objects that are stable removing this way in physx 2.8
// write lock and can safely delete it now. if (mScene->isWritable() )
if ( !mIsSimulating )
{ {
mScene->releaseActor( actor ); mScene->releaseActor( actor );
} }