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

Did you find this page useful? Please give it a rating: