Hello,
I have a situation where more objects (meshes) need to be manipulated (dragged, copied etc) at the same time. What would be the best way to do this? I tried to take for example 2 cubes and to put the in the group but I was not able to drag the group as a whole.
Is there another approach that might be better?
Many thanks!
Mirko
DragControls
actually supports dragging a group of objects. The official example demonstrates this feature:
https://threejs.org/examples/misc_controls_drag
You only have to ensure that DragControls
has a single draggable group in its internal object array and that DragControls.transformGroup
is set to true
.
Besides, if you clone a group, do it like so in order to make the clone recursive:
const clonedGroup = group.clone( true );
Hi Mugen87, thanks a lot for this!
Mirko