ViveTrackerDebugDisplay.cs 599 B

123456789101112131415161718192021222324252627
  1. using TMPro;
  2. using Tracking;
  3. using UnityEngine;
  4. namespace Display
  5. {
  6. public class ViveTrackerDebugDisplay : MonoBehaviour
  7. {
  8. public TextMeshProUGUI posText;
  9. public TextMeshProUGUI rotText;
  10. public FrontWheelTracker tracker;
  11. // Start is called before the first frame update
  12. private void Start()
  13. {
  14. }
  15. // Update is called once per frame
  16. private void Update()
  17. {
  18. posText.text = $"Pos: {tracker.Position.ToString()}";
  19. rotText.text = $"Rot: {tracker.Rotation.ToString()}";
  20. }
  21. }
  22. }