Documentation

Unity Engine

Download Unity

Unity Engine

attitude

Returns the attitude (ie, orientation in space) of the device.
Read time 1 minuteLast updated 2 days ago

Definition

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; }}