I want to register an event every time my mouse moves over a mesh (no clicking, just focus) and fire it continuously (eg, 60 fps) while it’s over the mesh, so I can react to where on the mesh it is at event time and behave differently. OnPointerOverTrigger/OnPointOutTrigger only fire once when you move over/away from the mesh, but don’t keep firing while you’re in. Didn’t find anything here or on html5gamedevs.com with this particular use case – is there a good way to do this?
You could setup a window.setTimeout
or a window.setInterval
on “enter” and remove it on “out”.
You could also simply set a variable that let you know that the pointer is currently over the mesh (isOver = true
in the “enter” event and isOver = false
in the “out” event) and react accordingly on a scene.onBeforeRenderObservable
event.
1 Like
Thank you!