I’m having some trouble when removing actors and handling controller callbacks. In my scene, I have a PxCapsuleController, and have the onShapeHit callback handled. I have a box, which when contacted by the capsule character, gets removed. The issue is that the next capsule move call actually collides with the removed box.
This is the offending call order:
mCapsuleController->move onShapeHit - queues the box for deletion mBoxRigidActor->release() mScene->simulate(dt) mScene->fetchResults(true) mCapsuleController->move onShapeHit - hit.shape is from the same rigid actor that was released above and the data is invalid!
Can anyone see what might be the issue here?