ResetHeadTrack.cs 581 B

12345678910111213141516171819202122232425262728293031
  1. using FfalconXR;
  2. using RayNeo.Native;
  3. using RayNeo.Tool;
  4. using System.Collections;
  5. using System.Collections.Generic;
  6. using UnityEngine;
  7. public class ResetHeadTrack : MonoBehaviour
  8. {
  9. // Start is called before the first frame update
  10. void Start()
  11. {
  12. TouchEventCtrl.Instance.OnDoubleTap += OnReset;
  13. }
  14. private void OnDestroy()
  15. {
  16. TouchEventCtrl.Instance.OnDoubleTap -= OnReset;
  17. }
  18. private void OnReset()
  19. {
  20. HeadTrackedPoseDriver.ResetQuaternion();
  21. }
  22. // Update is called once per frame
  23. void Update()
  24. {
  25. }
  26. }