private void PhysicsVolumeOnExited(Collider collider) { AttachableHolder holder = collider.GetComponent <AttachableHolder>(); if (null != holder && _entered.Contains(holder)) { if (null != _releaseSound) { _audioSource.PlayOneShot(_releaseSound); } _entered.Remove(holder); if (_entered.Count == 0) { MovementInteraction.ClearOverrideDampTarget(); } _events.Exited.Invoke(this, holder); } }
private void PhysicsVolumeOnExited(Collider collider) { Torquable torquable = collider.GetComponent <Torquable>(); if (null != torquable && _entered.Contains(torquable)) { _entered.Remove(torquable); if (torquable.Torqued) { torquable.enabled = false; } if (_entered.Count == 0) { MovementInteraction.ClearOverrideDampTarget(); MovementInteraction.MoveDamp = _initialMoveDamp; MovementInteraction.RotationDamp = _initialRotationDamp; _audioSource.PlayOneShot(_releaseSound); MovementInteraction.HeldButtons[0].ParentInteractor.ParentUserController.FireHapticKey("Exit"); } } }