Merge branch '3DBody' into 3DBodyVR

This commit is contained in:
shenjianxing 2025-03-26 11:39:59 +08:00
commit 6e9cafec5f
2 changed files with 15 additions and 0 deletions

View File

@ -18,4 +18,10 @@ struct EndScreenShot
struct OnLock
{
public bool isLock;
}
struct OnUpdatePos
{
public Vector3 pos;
public Vector3 rot;
}

View File

@ -53,6 +53,12 @@ public class Show3DCamera : MonoBehaviour
TypeEventSystem.Global.Register<OnLock>(OnLockEvent).UnRegisterWhenDisabled(this);
}
private void OnEnable()
{
#if Turing
gameObject.SetActive(false);
#endif
}
private void OnLockEvent(OnLock islock)
{
this.lockMove = islock.isLock;
@ -441,6 +447,9 @@ public class Show3DCamera : MonoBehaviour
// 相机始终朝向目标点
transform.LookAt(targetPos);
}
#if Turing
TypeEventSystem.Global.Send<OnUpdatePos>(new OnUpdatePos() { pos = gameObject.Position(), rot = gameObject.LocalEulerAngles() });
#endif
}
}