OnPointerOverTrigger and OutTrigger raised twice

Hey there, I’m fairly new to BabylonJS and found a weird behaviour which I’m not sure is intentional or not that’s causing a bug for me. Sorry if this actually belongs in Bugs! :sweat_smile:

On the actions page it says that the OnPointerOverTrigger and OutTrigger events are only raised once, however I found a case when they are raised twice instead. Whenever you scroll over a mesh that has raised that event once, it is raised a second time. Then, when OutTrigger is raised, whenever you scroll it is raised again.

Here’s a playground reproducing that behaviour: Babylon.js Playground

Thanks again! :smiley:

That’s the neatest edge case of the pointer system I have seen so far :slight_smile:

@PolygonalSun, want to take a look at this?

1 Like

Hey @Stepy, so I can take a closer look and try to understand what’s going on. Based on what I was seeing initially, my current working assumption is that it’s something related to an event listener or event handler in the OutTrigger and OverTrigger’s code. I am able to reliably repro this in both 5.0 alpha and 4.2 using these steps:

  1. Move mouse cursor over sphere
  2. Move mousewheel either up or down once
  3. Move mouse cursor off of sphere
  4. Move mousewheel either up or down once

Thanks for finding this!