hubs
hubs copied to clipboard
BG - Deleting an entity that should trigger an `On Collision Exit` event causes crash
Description
I have an empty with a Rigidbody/Shape component on it. There is a behavior graph that looks for On Collision Enter
& On Collision Exit
events.
If I put a spawned media object into the empty but then delete it, I get the following crashes/errors, although not always and not always the same one:
index.mjs:925 Uncaught Error: bitECS - entity does not exist in the world.
physics-system.js:333 Uncaught TypeError: Cannot read properties of undefined (reading 'collisions')
NOTE: This only occurs as a result of the behavior graph setup. If no On Collision Exit
event is there, no errors occur.
To Reproduce Steps to reproduce the behavior:
- Open the attached
.blend
file - Note the graph on the Empty object with the Rigidbody/Shape components
- Run in Hubs
- Spawn in 2d or 3d media and drop it inside the object (atop the hexagon).
- Hold spacebar and delete the object
- Crash (if not, try again)
Expected behavior
The entity should be removed and should also trigger any On Collision Exit
events. This is integral for things like keeping count of items in a trigger.
Hardware
- Device: Desktop
- OS: Windows
- Browser: Chrome