Trigger a click event only if the pointer did not move #1139
-
I'm wondering if there is a better way to trigger a click event on a mesh when the mouse hasn't move much or at all. When using I was trying to save some state to check if the user moved the mouse during the click. I am using Any suggestions would be greatly appreciated! Thank you. Also, this might be more of a general js question... |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Took me a bit but I found the delta property on the event.. I am now checking if I also realize this really has nothing do to with R3F... |
Beta Was this translation helpful? Give feedback.
Took me a bit but I found the delta property on the event..
e.delta
I am now checking if
e.delta < 10
and it's working great.I also realize this really has nothing do to with R3F...