/// <summary> /// The Toggle Method is used to enable or disable the pointer renderer. /// </summary> /// <param name="pointerState">The activation state of the pointer.</param> /// <param name="actualState">The actual state of the activation button press.</param> public virtual void Toggle(bool pointerState, bool actualState) { if (controllingPointer && !pointerState) { controllingPointer.ResetActivationTimer(); PointerExit(destinationHit); } ToggleInteraction(pointerState); ToggleRenderer(pointerState, actualState); }
/// <summary> /// The Toggle Method is used to enable or disable the pointer renderer. /// </summary> /// <param name="pointerState">The activation state of the pointer.</param> /// <param name="actualState">The actual state of the activation button press.</param> public virtual void Toggle(bool pointerState, bool actualState) { if (pointerState) { destinationHit = new RaycastHit(); } else if (controllingPointer != null) { controllingPointer.ResetActivationTimer(); PointerExit(destinationHit); } ToggleInteraction(pointerState); ToggleRenderer(pointerState, actualState); }