It works pretty well most of the time. But if the player is overlapping with the item when it respawns, the physics don’t work.
My WorldCollisionMesh is set to ignore Pawns, so I can’t even imagine why this would happen. I have a separate collision sphere for colliding with Pawns and letting the item get collected.
Also when I change the respawn code to reenable physics afterwards instead of before:
The object appears at it’s InitialTransform position for a frame then immediately snaps to where it would normally be as if the physics got simulated at a very fast rate. And if the player is standing over it, it falls through the floor.
I encountered a similar issue with going in and out of my game mode in my in-game editor, with an object that should only simulate physics during game time and be still in the editor mode
for the INITIAL setting of physics, you dont have to wake all rigid bodies
but for subsequent calls to setting physics to active you have to manually trigger all bodies to be awakened
Make the actor hidden first, then enable collision. That way, if the player is standing right over the item, it won’t be reset back to visible upon being recollected.
I was totally mistaking this for the physics being frozen somehow earlier.