文档

Unity Engine

Unity Engine

attitude

Returns the attitude (ie, orientation in space) of the device.
阅读时间1 分钟最后更新于 1 个月前

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.InputLegacyModule
public Quaternion attitude { get; }

Examples

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