Why can children be detected when I hide the parent node

  • Why can children be detected when I hide the parent node?

I guess you are referring to raycasting, right?

If so, it was decided in earlier discussions that Object3D.visible should not affect raycasting. If you need to sort out objects, use the layers feature.

https://threejs.org/docs/index.html#api/en/core/Raycaster.layers

think you,I found this method too, but it was a bit of a hassle, needing to focus on both visible and layer , * Is there any other easy way?

No sorry. Using layers is the way to go here.

Thank you very much. I am a novice, could you please tell me how to add scripts to object?