/** * Detaches the object from the player's control. */ public override void LetGo(bool ignoreEvents = false) { canCallSnapEvents = true; SetGravity(true); if (dragMode == DragMode.RotateOnly && moveWithRigidbody) { _rigidbody.velocity = Vector3.zero; } if (!ignoreEvents) { RunInteraction(false); } base.LetGo(ignoreEvents); if (dragMode == DragMode.LockToTrack && track != null) { track.OnLetGo(this); } }
/** * Detaches the object from the player's control. */ public override void LetGo(bool ignoreInteractions = false) { lastFrameForce = Vector3.zero; canCallSnapEvents = true; SetGravity(true); if (dragMode == DragMode.RotateOnly && UsesRigidbody) { _rigidbody.velocity = Vector3.zero; } if (!ignoreInteractions) { RunInteraction(false); } base.LetGo(ignoreInteractions); if (dragMode == DragMode.LockToTrack && track) { track.OnLetGo(this); } }