2024-10-24 16:16:57 +08:00
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
namespace ZC
|
|
|
|
|
{
|
|
|
|
|
public class TestZhongLi : GameObjectBase<TestZhongLi>
|
|
|
|
|
{
|
|
|
|
|
public override void OnUpdate(float dateTime)
|
|
|
|
|
{
|
|
|
|
|
base.OnUpdate(dateTime);
|
|
|
|
|
Debug.Log("没找到?");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Update()
|
|
|
|
|
{
|
2024-11-08 17:25:44 +08:00
|
|
|
|
transform.Rotate(Vector3.up);
|
|
|
|
|
// if (SystemInfo.supportsGyroscope)
|
|
|
|
|
// {
|
|
|
|
|
// var gyro = Input.gyro;
|
|
|
|
|
// gyro.enabled = true;
|
|
|
|
|
// Debug.Log($"{gyro.rotationRate} , {gyro.attitude}");
|
|
|
|
|
// // Camera.main.transform.Rotate(gyro.rotationRate);
|
|
|
|
|
// Camera.main.transform.rotation = gyro.attitude;
|
|
|
|
|
// Debug.Log($"raw: {Input.compass.rawVector}");
|
|
|
|
|
// }
|
|
|
|
|
// else
|
|
|
|
|
// {
|
|
|
|
|
// // Debug.Log("没找到?");
|
|
|
|
|
// }
|
2024-10-24 16:16:57 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|