123456789101112131415161718192021222324252627282930 |
- using TMPro;
- using Tracking;
- using UnityEngine;
- namespace Display
- {
- public class ViveTrackerDebugDisplay : MonoBehaviour
- {
- public TextMeshProUGUI posText;
- public TextMeshProUGUI rotText;
- public FrontWheelTracker tracker;
- private bool istrackerNull;
- // Start is called before the first frame update
- private void Start()
- {
- istrackerNull = tracker == null;
- }
- // Update is called once per frame
- private void Update()
- {
- if (istrackerNull || !tracker.isActiveAndEnabled) return;
- posText.text = $"Pos: {tracker.RelativePosition.ToString()}";
- rotText.text = $"Rot: {tracker.SteerRotation.ToString()}";
- }
- }
- }
|