Problem with "triggerleave" event

I am trying to make a one-way platform. I use a trigger for that to determine that the player is above the platform. But for some reason event “triggerleave” does not dispatch if the player passes the trigger vertically. If the player moves to the left, or to the right, then the event works.

Demo project: (I used an orthographic camera for demo purposes)


Hmm… Need to look into a little more. The one thing I have found out is that pressing left and right gives a slight increase in the vertical impulse. So when I changed the jump power to something a little higher like 8, it ‘works’ as intended.

This does make me wonder if the triggers are bigger than how they look in the editor?

1 Like

Demo #2, without gravity:

I have no idea how to solve this problem! :cry:

Looking more into it and it looks like it could be a bug with Ammo.js/Bullet (the physics engine that we are using). Either that, or there is setting that needs to be changed in Ammo.js to have triggers work ‘correctly’ with objects that don’t change direction (which seems very odd).

1 Like