I have used a raycaster on an object and when I try to sort to get label details through intersects.object.parent.children.name and add URL inside it then it works on labels as well as the complete object i.e. URL gets clicked on the label and other parts of that object as well. So is there any way to add a URL on the click of the label(annotation/dimension) only
Not sure what your ‘label’ is. Has it a mesh? Then can’t you just raycast that?
if i’ m right , intersectionObjet.object is a mesh , so you can use his name , or use the name of intersectionObjet.object.material to test if you click just on the label or other part of the object .
for example if your object come from blender an object is orgazined according material . all geometry are in the same mesh which have the same material . So if you use only one material for each label ,
you can use the name of material give in blender to detect the good mesh of object and only this one .
EDIt : the idea is , don’t use intersects.object.parent.children.name to test cause all children(of parent object ) catch by raycast give you same result , so use directly the name of intersects.object.name or the name of intersects.object.material.name ( best solution )