Example #1
0
        public void StopTrackingHardwarePlayer()
        {
            if (_hardwareHeadset == null)
            {
                return;
            }

            _hardwareHeadset.poseUpdated -= new Hardware.PoseUpdatedDelegate(PoseUpdated);
            _hardwareHeadset              = null;
        }
Example #2
0
        public void StartTrackingHardwarePlayer(Hardware.Headset hardwareHeadset)
        {
            if (!photonView.isMine)
            {
                Debug.Log("Attempting to locally track player that isn't owned by this client. Bailing. This is a bug.");
                return;
            }
            if (_hardwareHeadset != null)
            {
                Debug.Log("StartTrackingHardwarePlayer called on head that is already tracking locally. Bailing. This is a bug.");
                return;
            }

            _hardwareHeadset = hardwareHeadset;

            _hardwareHeadset.poseUpdated += new Hardware.PoseUpdatedDelegate(PoseUpdated);
            SyncInitialPose();
        }