eye-therapy-2 / Assets / Scripts / Interactables / XRTwoHandGrabInteractable.cs
XRTwoHandGrabInteractable.cs
Raw
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.XR.Interaction.Toolkit;

public class XRTwoHandGrabInteractable : XRGrabInteractable
{
    public override bool IsSelectableBy(XRBaseInteractor interactor)
    {
        bool isGrabbed = selectingInteractor && !interactor.Equals(selectingInteractor);
        return base.IsSelectableBy(interactor) && isGrabbed;
    }
}