Hello, I am trying to set the location of an object using object vertex, in other words, I need to set 1 object vertex location that equals another object vertex location.
Thanks for the reply.
Hello, I am trying to set the location of an object using object vertex, in other words, I need to set 1 object vertex location that equals another object vertex location.
Thanks for the reply.
Do you mean something like this?
However, examples are with the old geometry. Must be adapted.
I can’t really understand this example.
Up
I’m assuming you have the coordinates of the target vertices.
Face = Mesh_1; Glasses = Mesh_2
v_1 = Face_vertex; v_2 = Glasses_vertex;
First copy the component of v_1 & v_2 to new vectors.
Use localToWorld() to convert to world space.
Subtract v_1 from v_2 = v_12.
Translate Mesh_2 by v_12.
https://threejs.org/docs/#api/en/math/Vector3
https://threejs.org/docs/#api/en/core/Object3D