I’m trying to make an fbx clickable. I loaded the fbx, created a box from object so the box matches the loaded fbx. I created a boxhelper based on that box, gave it a name and added that to the scene and to a custom “meshColliders” array. When I use rayCaster.intersectObjects(meshColliders), I can succefully extract the boxHelper name I’m using to handle the click and trigger the event.
The problem is that there’s always a boxHelper visible in the scene. So I tried not adding the boxHelper to the scene so it’s only added to that meshColliders array, what I thought would happen was that it simply does not show the boxHelper but still work as planned, but the fact that I don’t add it to the scene makes the event trigger wherever I click instead of only when I actually click on the fbx.
How can this happen? And what’s a good practice for making fbx’s clickable. Adding the fbx child geometry or boundingbox to the meshColliders array does not work.