Hi all,
I would like to use a flow in this example:
https://threejs.org/examples/?q=webxr#webxr_xr_dragging
but I would like to move a group of objects at once
So what I have worked out in:
controller1 = renderer.xr.getController( 0 );
controller1.addEventListener( 'selectstart', onSelectStart );
controller1.addEventListener( 'selectend', onSelectEnd );
scene.add( controller1 );
I have to adjust onSelectStart/onSelectEnd
In the onSelect method:
function onSelectStart( event ) {
I decided to attach the parent of the selected object to the controllers via:
const parent = object.parent;
controller.attach( parent );
But on the onSelectEnd method, how do I detach it from the controller? or just have the groups to stay in place? I tried a number of things including:
controller.remove( parent )
scene.add(parent)
but this just removes the parent completely. I have tried other variations and they all seem to give different responses.