I have a use case in threejs to dynamically hit a point using mouse click on an object to add in labels. Currently I am using raycasting, but raycasting’s intersect point seems to not work correctly when the object is scaled.
Please follow the fiddle, it creates dynamic annotation. Uncomment the cube scale line to see the annotation are positioned further away.
Please could someone help:
- How to get the sprite material position correctly when the object is scaled?
2)Sprite cannot be used with glTF, is there a example on how to convert sprite material to be used with glTF?
3)how can i position the camera to the face where the mouse click coordinates on the object?
Thanks a lot!