In my view, I defined a 3DObject with children. In click event I want try to get the clicked object with raycaster.intersectObject.
The problem is that the mesh has an opacity, which means that children that were added in one side of the 3D are visible also when the model is rotated, and when the user clicks on them - the raycaster returns these objects, although they are actually located on the other side of the 3D.
Are your model’s faces doublesided?
three raycast go trough the back of single sided faces, and hit anything beyond it.
another option is to raycast an array of selected objects and not the whole scene. This way you never hit excluded objects.
you can change children inclusion like this too. intersections = raycaster.intersectObjects(myArray, true); (including children)
or intersections = raycaster.intersectObjects(myArray, false); (without children)