10-29-2024 02:02 AM
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.
10-29-2024 08:09 AM
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()