Example #1
0
    public void TransforAttached(XRHand other)
    {
        if (attached)
        {
            other.DetachIfAny();
            other.attached = attached;
            foreach (var c in attached.GetComponentsInChildren <Collider>())
            {
                other.IgnoreCollider(c);
            }
            attached = null;


            SendHapticImpulse(hapticSettings.detachStrength, hapticSettings.detachDuration);
            other.SendHapticImpulse(other.hapticSettings.attachStrength, other.hapticSettings.attachDuration);
        }
    }