Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BG - Deleting an entity that should trigger an On Collision Exit event causes crash #6441

Open
j-conrad opened this issue Jan 17, 2024 · 0 comments
Labels

Comments

@j-conrad
Copy link
Contributor

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:

  1. Open the attached .blend file
  2. Note the graph on the Empty object with the Rigidbody/Shape components
  3. Run in Hubs
  4. Spawn in 2d or 3d media and drop it inside the object (atop the hexagon).
  5. Hold spacebar and delete the object
  6. 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

ColliderDeletion_bug.zip

@j-conrad j-conrad added bug P2 Address when able Behavior Graphs labels Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant