ViveTrackerDebugDisplay.cs 593 B

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