object: Unmark body as dirty when destroyed

Fixes some crashes since this was introduced.
pull/100/head
Joshua Ashton 5 months ago
parent 954d301a2b
commit 6767ca8f32

@ -68,6 +68,8 @@ JoltPhysicsObject::~JoltPhysicsObject()
for ( int i = m_destroyedListeners.Count() - 1; i >= 0; i-- )
m_destroyedListeners[ i ]->OnJoltPhysicsObjectDestroyed( this );
m_pEnvironment->RemoveDirtyStaticBody( GetBodyID() );
JPH::BodyInterface& bodyInterface = m_pPhysicsSystem->GetBodyInterfaceNoLock();
bodyInterface.DestroyBody( GetBodyID() );
}

Loading…
Cancel
Save