예제 #1
0
        private void Start()
        {
#if OCULUS_QUEST
            _currentHandState = new OVRPlugin.HandState();
#endif

            InputTracking.nodeAdded   += NodeAdd;
            InputTracking.nodeRemoved += NodeRemove;

            _manager = FindObjectOfType <BaseManager>();
            if (Point == XRNode.HardwareTracker)
            {
                _manager.MapHardwareTrackers += MapHardwareTrackers;
            }

            _nodes = new List <XRNodeState>();
        }
예제 #2
0
        private void Awake()
        {
            _collider         = GetComponent <Collider>();
            _collider.enabled = true;

            switch (_index)
            {
            case ControllerInputIndex.LeftHand:
                _xrNode = XRNode.LeftHand;
                break;

            case ControllerInputIndex.RightHand:
                _xrNode = XRNode.RightHand;
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }

            _vrManager          = FindObjectOfType <BaseManager>();
            _vrManager.Grab    += Grab;
            _vrManager.Trigger += Trigger;
        }