/// <summary>Function for controller trigger unpressed</summary> public void Release() { //Do the holding object calls and sets if (holdingObj != null) { if (holdingObj.GetComponent <GrabLock>()) { return; } OnBeforeReleased?.Invoke(this, holdingObj); if (squeezing) { holdingObj.OnUnsqueeze(this); } holdingObj.OnRelease(this, true); OnReleased?.Invoke(this, holdingObj); } BreakGrabConnection(); }
/// <summary>Event for controller ungrip</summary> public void Unsqueeze() { squeezing = false; OnUnsqueezed?.Invoke(this, holdingObj); holdingObj?.OnUnsqueeze(this); }