Пример #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);
        }
Пример #2
0
        public virtual void SetNavMeshCheckDistance(float distance)
        {
            VRTK_NavMeshData givenData = gameObject.AddComponent <VRTK_NavMeshData>();

            givenData.distanceLimit = distance;
            SetNavMeshData(givenData);
        }
Пример #3
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();
        }
Пример #4
0
 /// <summary>
 /// The SetNavMeshData method is used to limit the destination marker to the scene NavMesh based on the settings in the given NavMeshData object.
 /// </summary>
 /// <param name="givenData">The NavMeshData object that contains the NavMesh restriction settings.</param>
 public virtual void SetNavMeshData(VRTK_NavMeshData givenData)
 {
     navmeshData = givenData;
 }