Hello everyone. What’s up?
I’m new with ThreeJs and I’m here working with Raycaster. I can’t seem to get it to recognize click types other than left-click. Is there some limitation of it?
Another curious fact is that I can’t even through javascript functions
functions that I found on StackOverflow to capture these other clicks.
Thank you for your quick reply @M3lk0r. The platform I am using does not allow imports of modules, I use handlebars in development, and this integration, for some reason is not allowed… I am even using /js from the ThreeJS library and not /jsm…
Hey
First thing first, always remember that targeting your event listeners is really important.
Try to use domElement of your renderer first.
Besides that, keep in mind that WebGL handles pointer event better than mouse, for example, pointer does exist on mobile devices but mouse event does not. Try using window.addEventListener('pointerup', onClick, false);