I am working with a 3D object that includes a cube mesh as a child. I am trying to adjust the position of the 3D object within the mesh in order to manipulate the pivot points of the cube mesh. You can find the code snippet on this codepen link.
mesh = new THREE.Object3D();
mesh.name = "mesh1";
mesh.position.set(0.2, 0, 0);
scene.add(mesh);
var mesh1 = new THREE.Mesh(geometry1, material1);
scene.add(mesh1);
mesh1.name = "mesh2";
mesh1.position.set(0.4, 0, 0);
mesh.add(mesh1);
Any help would be greatly appreciated.