But in above link, i only able to find distance between two random click on geometry.
In my case i want to find distance between two vertex when mouse highlight it. So that i can find exact distance between vertex.
Hi!
Try to use barycentric coordinates of a triange that you can build from vertices.
It means you highlight a vertex that your point of intersection close to.
A rough example with using of barycentric coordinates of faces of a non-indexed buffer geometry (an STL-model from examples): https://jsfiddle.net/prisoner849/jx9rfq5n/
I see no single reason why we can’t
Create a box mesh, put it at some position that is surely never happen to be in the camera frustum at the beginning (kind of box.position.setScalar(10000)) then on a mouse down event just change the position of the box with copying the position of a marker: box.position.copy(marker.position);
Hey,
Its Working .
Actually i want to calculate distance between two point which is got after on mouse down event on two highlights vertex at once in scene.
In my scene i loaded .stl file.
i used this ,yet not implement.
I have seen that topic
It work fine but i want that markers via highlighted vertex and after highlighted on mouse down event i want distance between that .
I tried it, yet stuck.
On highlighted vertex not able to add your markers.