Adding and removing actors from scene issues


I’m having issues with adding and removing actors during gameplay for shared resuable items such as bullets. Originally I had everything added to scene at creation time and this worked, then when starting using visual debugger found that even if disable simulation on them, they were still showing up in the scene and collidable from other objects. So changed my code to add and remove these items as needed. This seemed like best approach until strange things started happening. After adding dynamic rigid bodies back into the scene after previously removing them sometimes they don’t move and don’t show a debugger visual either. I tried wakeup on them and it was reporting that they were not in the scene, even though calling wakeup straight away after adding to scene was working with no errors.

Is this approach of adding and removing actors correct way to use physx, or should I just change collision properties while bullets are not being used?

Thanks in advance for any help

Slight update on this issue, it seems the problem occurs if an rigid body is removed and added back into scene before a step physics has happened. Extra checks for making a bullet available again only after the physics step seem to fix it, but maybe just masking a deeper issue in physx now.