Browse Source

更改获取头部信息方式

胡佳骏 1 year ago
parent
commit
d4dbc37885
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Assets/Scripts/IrobotMove.cs

+ 2 - 2
Assets/Scripts/IrobotMove.cs

@@ -22,8 +22,8 @@ public class IrobotMove : MonoBehaviour
 
     private void Start()
     {
-        if (GameObject.Find("NRCameraRig") != null)
-            NRCameraRig = GameObject.Find("NRCameraRig").GetComponent<Transform>();
+        //  if (GameObject.Find("NRCameraRig") != null)
+        NRCameraRig = OpenXRCamera.Instance.head;//GameObject.Find("NRCameraRig").GetComponent<Transform>();
 
         m_IsWalk = false;
         m_Animator = GetComponent<Animator>();