Version: 2021.2
public Quaternion attitude ;

描述

返回设备的姿态(即在空间中的方向)。

using UnityEngine;

public class Example : MonoBehaviour { // Rotate the object to match the device's orientation // in space. void Update() { transform.rotation = Input.gyro.attitude; } }