Pointer events only fire when mouse is moving #1558
Unanswered
cristobalbahe
asked this question in
Q&A
Replies: 1 comment 1 reply
-
thats how events work in the browser but you could fire the raycaster manually, i'd only watch out not to do it every frame. you find the events handlers under state.events.handlers and you can call them with fake events, like { offsetX: ..., offsetY: ... } |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone,
I don't know if this is the intended behaviour but I've run across the following problem:
I have in my scene a number of objects and a camera that travels through them as if it was a tunnel.
Each of the objects has a onPointerOver event so that when the user goes over it, it will update some react state. When I do this while moving my mouse it works just fine.
The problem is that since the camera is moving constantly and therefore picking new objects without the need of interaction, if I stop moving the mouse, the events stop firing although the raycaster is intersecting the objects correctly (I've checked in useFrame() ).
I can just use the raycaster in useFrame and do it manually, but I was wondering if there is something I am missing.
Thanks everybody in advance!
Beta Was this translation helpful? Give feedback.
All reactions