When I try to delete a static mesh (as a level) no debug errors occur, yet the old mesh appears to still exist, just because it's restricting where I can go and the restrictions feel awfully familiar to the previously loaded static mesh.
Here is a video to demonstrate what's going wrong:
The code I am using to delete the rigid bodies:
function DeleteAll()
`i = 1
for i = 1 to 5000
if sound exist(i) = 1 then delete sound i
if music exist(i) = 1 then delete music i
if object exist(i) = 1 then delete object i
if image exist(i) = 1 then delete image i
if phy get rigid body exist ( i ) = 1 then phy delete rigid body i
if phy get character controller exist ( i ) =1 then phy delete character controller i
next i
endfunction
Also, I also call this before I call 'DeleteAll()' (the delete all function has worked on non-static rigid bodies). I was testing if DeleteAll() was the problem:
phy delete rigid body scene(scene).Map.num
But the same problem occurs, so it's not that.
Is there a possibility it's a bug in Dark Physics? Before I updated my Dark Physics I was unable to delete Character Controllers (after update with no changes to the code it worked), but at least that came up with an error.
Perhaps there's an alternative.
[edit] removed a dumb statement