Esempio n. 1
0
        public virtual void InitalizePointer(VRTK_Pointer givenPointer, VRTK_PolicyList givenInvalidListPolicy, float givenNavMeshCheckDistance, bool givenHeadsetPositionCompensation)
        {
            VRTK_NavMeshData givenData = gameObject.AddComponent <VRTK_NavMeshData>();

            givenData.distanceLimit = givenNavMeshCheckDistance;
            InitalizePointer(givenPointer, givenInvalidListPolicy, givenData, givenHeadsetPositionCompensation);
        }
Esempio n. 2
0
    void Start()
    {
        EmptyPath();
        SetUpVisualizer();
        this.enabled = false;

        mPointer         = GameManager.Instance.RightControllerEvents.gameObject.GetComponent <VRTK.VRTK_Pointer>();
        mPointerRenderer = GameManager.Instance.RightControllerEvents.gameObject.GetComponent <VRTK.VRTK_StraightPointerRenderer>();
    }
 protected virtual void Initialize()
 {
     if (events == null)
     {
         events = GetComponentInParent <VRTK_ControllerEvents>();
     }
     if (pointer == null)
     {
         pointer = GetComponentInParent <VRTK_Pointer>();
     }
 }
 protected virtual void ToggleCursor(object sender, bool state)
 {
     if ((hidePointerCursorOnHover || hideDirectionIndicatorOnHover) && sender.GetType() == typeof(VRTK_Pointer))
     {
         VRTK_Pointer pointer = (VRTK_Pointer)sender;
         if (pointer != null && pointer.pointerRenderer != null)
         {
             TogglePointerCursor(pointer.pointerRenderer, state);
             ToggleDirectionIndicator(pointer.pointerRenderer, state);
         }
     }
 }
Esempio n. 5
0
 // Token: 0x06001130 RID: 4400 RVA: 0x00064AD4 File Offset: 0x00062CD4
 protected virtual void ToggleCursor(object sender, bool state)
 {
     if ((this.hidePointerCursorOnHover || this.hideDirectionIndicatorOnHover) && sender.GetType().Equals(typeof(VRTK_Pointer)))
     {
         VRTK_Pointer vrtk_Pointer = (VRTK_Pointer)sender;
         if (vrtk_Pointer != null && vrtk_Pointer.pointerRenderer != null)
         {
             this.TogglePointerCursor(vrtk_Pointer.pointerRenderer, state);
             this.ToggleDirectionIndicator(vrtk_Pointer.pointerRenderer, state);
         }
     }
 }
        /// <summary>
        /// The InitalizePointer method is used to set up the state of the pointer renderer.
        /// </summary>
        /// <param name="givenPointer">The VRTK_Pointer that is controlling the pointer renderer.</param>
        /// <param name="givenInvalidListPolicy">The VRTK_PolicyList for managing valid and invalid pointer locations.</param>
        /// <param name="givenNavMeshCheckDistance">The given distance from a nav mesh that the pointer can be to be valid.</param>
        /// <param name="givenHeadsetPositionCompensation">Determines whether the play area cursor will take the headset position within the play area into account when being displayed.</param>
        public virtual void InitalizePointer(VRTK_Pointer givenPointer, VRTK_PolicyList givenInvalidListPolicy, float givenNavMeshCheckDistance, bool givenHeadsetPositionCompensation)
        {
            controllingPointer          = givenPointer;
            invalidListPolicy           = givenInvalidListPolicy;
            navMeshCheckDistance        = givenNavMeshCheckDistance;
            headsetPositionCompensation = givenHeadsetPositionCompensation;

            if (controllingPointer && controllingPointer.interactWithObjects && controllingPointer.controller && !objectInteractor)
            {
                controllerGrabScript = controllingPointer.controller.GetComponent <VRTK_InteractGrab>();
                CreateObjectInteractor();
            }
        }
Esempio n. 7
0
 // Token: 0x0600187C RID: 6268 RVA: 0x000824A4 File Offset: 0x000806A4
 public virtual void InitalizePointer(VRTK_Pointer givenPointer, VRTK_PolicyList givenInvalidListPolicy, float givenNavMeshCheckDistance, bool givenHeadsetPositionCompensation)
 {
     this.controllingPointer          = givenPointer;
     this.invalidListPolicy           = givenInvalidListPolicy;
     this.navMeshCheckDistance        = givenNavMeshCheckDistance;
     this.headsetPositionCompensation = givenHeadsetPositionCompensation;
     if (this.controllingPointer != null && this.controllingPointer.interactWithObjects && this.controllingPointer.controller != null && this.objectInteractor == null)
     {
         this.controllerGrabScript = this.controllingPointer.controller.GetComponent <VRTK_InteractGrab>();
         this.CreateObjectInteractor();
     }
     this.SetupDirectionIndicator();
 }
Esempio n. 8
0
        /// <summary>
        /// The InitalizePointer method is used to set up the state of the pointer renderer.
        /// </summary>
        /// <param name="givenPointer">The VRTK_Pointer that is controlling the pointer renderer.</param>
        /// <param name="givenInvalidListPolicy">The VRTK_PolicyList for managing valid and invalid pointer locations.</param>
        /// <param name="givenNavMeshData">The NavMeshData object that contains the Nav Mesh restriction options.</param>
        /// <param name="givenHeadsetPositionCompensation">Determines whether the play area cursor will take the headset position within the play area into account when being displayed.</param>
        public virtual void InitalizePointer(VRTK_Pointer givenPointer, VRTK_PolicyList givenInvalidListPolicy, VRTK_NavMeshData givenNavMeshData, bool givenHeadsetPositionCompensation)
        {
            controllingPointer          = givenPointer;
            invalidListPolicy           = givenInvalidListPolicy;
            navMeshData                 = givenNavMeshData;
            headsetPositionCompensation = givenHeadsetPositionCompensation;

            if (controllingPointer != null && controllingPointer.interactWithObjects && controllingPointer.controllerEvents != null && objectInteractor == null)
            {
                controllerGrabScript = controllingPointer.controllerEvents.GetComponentInChildren <VRTK_InteractGrab>();
                CreateObjectInteractor();
            }
            SetupDirectionIndicator();
        }
Esempio n. 9
0
        protected virtual void ToggleCursor(object sender, bool state)
        {
            if (hidePointerCursorOnHover && sender.GetType().Equals(typeof(VRTK_Pointer)))
            {
                VRTK_Pointer pointer = (VRTK_Pointer)sender;

                if (!state)
                {
                    storedCursorState = pointer.pointerRenderer.cursorVisibility;
                    pointer.pointerRenderer.cursorVisibility = VRTK_BasePointerRenderer.VisibilityStates.AlwaysOff;
                }
                else
                {
                    pointer.pointerRenderer.cursorVisibility = storedCursorState;
                }
            }
        }
		public virtual void InitalizePointer(VRTK_Pointer u091Cu0923u0923u0926u091Fu0922u0921u091Bu091Eu091Au0921, VRTK_PolicyList u0925u0921u091Fu0926u091Bu0927u091Au0922u091Fu0925u0920, float u091Cu0920u0921u0921u091Du091Cu0924u091Cu0928u0920u091D, bool u091Bu091Bu0921u091Du0923u091Bu0923u091Eu091Au091Eu091E) {} // 0x0000000180E09A30-0x0000000180E09BF0
 protected virtual void Awake()
 {
     menu    = GetComponent <VRTK_RadialMenu>();
     pointer = GetComponent <VRTK_Pointer>();
     Initialize();
 }
Esempio n. 12
0
 private void OnValidate()
 {
     pointer          = GetComponent <VRTK.VRTK_Pointer>();
     controllerEvents = GetComponent <VRTK.VRTK_ControllerEvents>();
 }
Esempio n. 13
0
 // Start is called before the first frame update
 void Start()
 {
     vRTK_Pointer = this.GetComponent <VRTK_Pointer>();
     events       = this.GetComponent <VRTK_ControllerEvents>();
     pointer_Flag = 0;
 }