Input.accelerationEvents

Cambiar al Manual
public static AccelerationEvent[] accelerationEvents ;

Descripción

Devuelve la lista de mediciones de aceleración que ocurrieron durante el último frame. (Read Only) (asigna variables temporales).

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { void Update() { Vector3 acceleration = Vector3.zero; foreach (AccelerationEvent accEvent in Input.accelerationEvents) { acceleration += accEvent.acceleration * accEvent.deltaTime; } print(acceleration); } }