I am working on a project where I need to load an .obj file representing a human body. The goal is to allow users to select two vertices and highlight them with flags, followed by finding the index of these vertices in the original .obj file. Subsequently, I aim to run a php script to measure the distance between the two selected vertices.
Despite trying various methods, particularly when selecting the two vertices, I have not been successful so far. My current approach utilizes the obj loader which works seamlessly; however, I encountered issues determining the vertex I clicked on using Projector and Ray, as it consistently returns an empty array.
Here is my code progress until now: I check if the intersects array is not empty, then proceed to identify the nearest vertex from the file, change the object's color, and adjust the face that was clicked on.
<!doctype html>
<html lang="en">
<head>
<!-- Code continues... -->
</head>
<body>
<!-- More code... -->
The specific .obj file mentioned can be accessed at this link
If anyone could provide guidance or suggestions to help me solve this issue, your assistance would be greatly valued.
Thank you very much in advance! :)