cancel
Showing results for 
Search instead for 
Did you mean: 

How to use Forced grabbing

lnw1006
Honored Guest

I'm using Meta All in one SDK68.0.2 with hand tracking, but I don't know how to program objects to automatically grab onto my hand, rather than having to grab them myself.

1 REPLY 1

disco42069
Honored Guest

You can use ForceSelect():

// Force Select on trigger enter
private void OnTriggerEnter(Collider other)
    {
        Debug.Log("triggered: " + other.name);
        // modify GetComponent scope on line below as you need
        var handGrabInteractor = other.GetComponentInParent<HandGrabInteractor>(); 
        if (handGrabInteractor == null) return;
        handGrabInteractor.ForceSelect(handGrabInteractable);
    }

 To release you can use ForceRelease()