VuforiaFollow.cs 747 B

1234567891011121314151617181920212223242526
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using SC.XR.Unity;
  5. public class VuforiaFollow : MonoBehaviour {
  6. // Use this for initialization
  7. void Start() {
  8. StartCoroutine(InitARCamera());
  9. }
  10. IEnumerator InitARCamera() {
  11. while(true) {
  12. transform.position = OpenXRCamera.Instance.head.position;
  13. transform.eulerAngles = OpenXRCamera.Instance.head.eulerAngles;
  14. yield return null;
  15. }
  16. }
  17. // Update is called once per frame
  18. void Update() {
  19. //gameObject.transform.position = API_GSXR_Slam.SlamManager.modifyPosition;
  20. //gameObject.transform.rotation = API_GSXR_Slam.SlamManager.modifyOrientation;
  21. }
  22. }