"Near dragging" a mesh in immersive-vr with and without SixDofDragBehavior

Thank you. I know you guys must be busy with getting the version 7.0 out, so not expecting miracles, but you @RaananW surprised me positively before, so hoping for a fix sometime soon :slight_smile:

We did that a while ago; that does what we want when a motion controller is used but unfortunately not when a “hand controller” (hand tracking) is used. More specifically, when we parent the grabbed mesh to the controller (see pseudo code of exactly what we do below), the grabbed mesh moves/rotates in sync with user’s forearm movement AND (importantly for us) in sync with user’s hand movement and rotation. That is what we want and that does happen when a (Quest) motion controller is used.

However, when controller that’s grabbed the mesh happens to be a hand, the grabbed mesh still moves in sync with user’s forearm movement (which is good) but it does NOT move/rotate in sync with user’s hand (wrist). And we need that. That is why I am onto the “near grabbing” hunt here…

Just in case; here is how we parent the meshes:

const event = ...;
const defaultXRExperience = ...;
const __root__mesh_imported_from_GLB = ...;

const controller =
    defaultXRExperience.pointerSelection.getXRControllerByPointerId(
        event.sourceEvent.pointerId);

__root__mesh_imported_from_GLB.parent = controller.pointer;

If you see something missing there :point_up_2: in order to get the mesh to move/rotate in sync with user's _hand_ (wrist) movement/rotation, can you point that out for us?..


Thank you. I see. And you also said that before. Sadly, after reading that and this I still don’t understand enough about it in order to actually use (you see me ask the basic questions like whether setting mesh.isNearGrabbable = true is enough to enable “near grabbing”, etc).

Can we make that clear once and for all? Would you mind clarifying exactly what mesh.isNearGrabbable = true does and how concretely a BSJ user can make use of it? Including

  • that small white sphere that appears (probably indicating that “near interaction proximity is achieved”) when a controller is brought near a isNearGrabbable mesh in space
  • exactly how setting isNearGrabbable affects firing those synthetic pointer events that BJS fires on meshes,
  • all other things that setting isNearGrabbable does,
  • and how one can harness that to implement useful interactions?

Huge thanks, as always :pray: