Hi All,
I want to include an Object in another to drag it as one object.
dragControls = new DragControls(allObjects, camera, renderer.domElement);
dragControls.transformGroup = true;
loader.load("/obj/objects/HB-2.obj", function (object) {
object.rotation.x = Math.PI * 2;
object.name = "Handler";
object.userData.name = objName;
for (let index = 0; index < object.children.length; index++) {
object.children[index].userData.uuid = object.uuid;
object.children[index].material.map = textureWalls;
object.children[index].castShadow = true;
object.children[index].receiveShadow = true;
Objobject.children.push(object.children[index]);
}
for (const child of Objobject.children) {
if (child.isMesh) child.material = child.material.clone();
}
allObjects.push(Objobject);
scene.add(Objobject);