/// <summary>
 /// The UpdateRenderer method is used to run an Update routine on the pointer.
 /// </summary>
 public virtual void UpdateRenderer()
 {
     if (playareaCursor)
     {
         playareaCursor.SetHeadsetPositionCompensation(headsetPositionCompensation);
         playareaCursor.ToggleState(IsCursorVisible());
     }
 }
示例#2
0
        /// <summary>
        /// The UpdateRenderer method is used to run an Update routine on the pointer.
        /// </summary>
        public virtual void UpdateRenderer()
        {
            if (playareaCursor != null)
            {
                playareaCursor.SetHeadsetPositionCompensation(headsetPositionCompensation);
                playareaCursor.ToggleState(IsCursorVisible());
            }

            if (directionIndicator != null)
            {
                UpdateDirectionIndicator();
            }
        }
示例#3
0
        protected virtual void TogglePointer(bool state)
        {
            ToggleObjectInteraction(state);

            if (playAreaCursor)
            {
                playAreaCursor.SetHeadsetPositionCompensation(headsetPositionCompensation);
                playAreaCursor.ToggleState(state);
            }

            if (!state && PointerActivatesUseAction(interactableObject) && interactableObject.holdButtonToUse && interactableObject.IsUsing())
            {
                interactableObject.StopUsing(controller.gameObject);
            }
        }
        protected virtual void TogglePlayArea(bool pointerState, bool actualState)
        {
            if (playareaCursor)
            {
                playareaCursor.SetHeadsetPositionCompensation(headsetPositionCompensation);
                playareaCursor.ToggleState(pointerState);
            }

            if (playareaCursor && pointerState)
            {
                if (actualState)
                {
                    ToggleRendererVisibility(playareaCursor.GetPlayAreaContainer(), false);
                    AddVisibleRenderer(playareaCursor.GetPlayAreaContainer());
                }
                else
                {
                    ToggleRendererVisibility(playareaCursor.GetPlayAreaContainer(), true);
                }
            }
        }