Gyroscope.attitude
public Quaternion attitude;
Description 描述
Returns the attitude (ie, orientation in space) of the device.
using UnityEngine;
public class Example : MonoBehaviour { // Rotate the object to match the device's orientation // in space. void Update() { transform.rotation = Input.gyro.attitude; } }