Hi everyone,
I’d like to know if it’s possible to select a material of a mesh with a picking function.
If the mesh has only one material, it’s easy with something like this
var pickResult = scene.pick(scene.pointerX, scene.pointerY);
if(pickResult.hit) {
console.log(pickResult.pickedMesh.material)
}
But if the mesh has more than one material…
Could you help me ?
Thanks,
Boris