The triggerleave event doesn't work anymore after reloading the scene, when the trigger entity is inside a rigidbody entity.
A workaround is to enable the trigger entity (or collision component) a frame later, but I don't think this is possible in all situations.
I think this bug can easily break projects that use a lot of trigger entities.
Here is a project with the issue:
https://playcanvas.com/editor/scene/1893502
Here is a project with a workaround:
https://playcanvas.com/editor/scene/1894025
The
triggerleaveevent doesn't work anymore after reloading the scene, when the trigger entity is inside a rigidbody entity.A workaround is to enable the trigger entity (or collision component) a frame later, but I don't think this is possible in all situations.
I think this bug can easily break projects that use a lot of trigger entities.
Here is a project with the issue:
https://playcanvas.com/editor/scene/1893502
Here is a project with a workaround:
https://playcanvas.com/editor/scene/1894025