Пример #1
0
        private void OnEnable()
        {
            CreateCollider();
            lastGoodPositionSet = false;
            headset             = VRTK_DeviceFinder.HeadsetTransform();
            StartCoroutine(WaitForHeadsetCollision(true));

            InitControllerListeners(VRTK_DeviceFinder.GetControllerLeftHand(), true);
            InitControllerListeners(VRTK_DeviceFinder.GetControllerRightHand(), true);
        }
Пример #2
0
        private void InitDestinationMarkerListeners(bool state)
        {
            var leftHand  = VRTK_DeviceFinder.GetControllerLeftHand();
            var rightHand = VRTK_DeviceFinder.GetControllerRightHand();

            InitDestinationSetListener(leftHand, state);
            InitDestinationSetListener(rightHand, state);
            foreach (var destinationMarker in VRTK_ObjectCache.registeredDestinationMarkers)
            {
                if (destinationMarker.gameObject != leftHand && destinationMarker.gameObject != rightHand)
                {
                    InitDestinationSetListener(destinationMarker.gameObject, state);
                }
            }
        }