I’m trying to develop an application with Three.js where I can measure the distance between two points on an object by clicking. Like here You can select the distance measurement from selecting the 5th button (ruler) from the top left.
I’ve tried for hours with these answers but got no where because there aren’t any complete answers, only pieces. So could you please help me add this functionality to this pen ?
Thanks so much
What point did you stuck at?
THREE.Raycaster() for clicking.
I’m stuck at the first step. I can’t figure out how to save 2 points as variable by getting the point of intersection.
Could you add that functionality in your codepen: when you click on the model, you set a visual marker (a sphere, for example) at the point of intersection?
I was working on local file. So didn’t have codepen for it. I just copied code from it to codepen just to show you what I’m trying to do.
Any chance to make that codepen working?
Or do you offer me to do it for you?
It’s working now.
I mean the pen. Not the distance measurement
Check this codepen with a very rough concept:
You’re such a wonderful person. Can’t thank you enough for times you helped me out. Thank you so much again for the help. I really appreciate it.