public void StopTrackingHardwarePlayer() { if (_hardwareController == null) { return; } _hardwareController.poseUpdated -= new Hardware.PoseUpdatedDelegate(PoseUpdated); _hardwareController = null; }
public void StartTrackingHardwarePlayer(Hardware.Controller hardwareController) { if (!photonView.isMine) { Debug.Log("Attempting to locally track player that isn't owned by this client. Bailing. This is a bug."); return; } if (_hardwareController != null) { Debug.Log("StartTrackingHardwarePlayer called on hand that is already tracking locally. Bailing. This is a bug."); return; } _hardwareController = hardwareController; _hardwareController.poseUpdated += new Hardware.PoseUpdatedDelegate(PoseUpdated); SyncInitialPose(); }