Question:
I want to highlight one of the boxes on hover. I dont understand, why all boxes are highlighted. In line 182 I log the selected name of the respective mesh, thats fine but in line 188 I change the color of the hovered mesh and all meshed are recolored.
Why is it not possible to modify an individual mesh from a gltf model with scene.getObjectByName()? scene.getObjectByName(name).remove() for example, dont work either.
PS: I googled for hours and read a lot in the docs… but I find no similar example. The most “interactive” demos (Raycaster) use three generated meshes and not imported ones.
Not working . I’ve updated the repo.
I get the right objects name (console), but it is still there. I want to remove it on hover, only for testing…
@Mugen87 Is there any way to hide the mesh instead of removing it. I am hide it by assigning a transparent material to the mesh but that way it is still there in the scene and takes clicks. I want to hide the mesh such that it doesn’t take clicks.