i need to calculate the distance between the two objects in three js. suppose an object already present at some position and when i drag another object besides or top or bottom of the previous object, the distance will show in the canvas…
It’s computationally expensive to find the closest distance between to meshes. You might want to approximate both meshes with an AABB and compute the distance between both bounding volumes.