Version: 2020.3
言語: 日本語
public static AccelerationEvent[] accelerationEvents ;

説明

最後のフレーム間で発生した測定によって得た加速度の値(読み取り専用) (一時的な変数を割り当てます)

using UnityEngine;

public class Example : MonoBehaviour { // Calculates weighted sum of acceleration measurements which occurred during the last frame // Might be handy if you want to get more precise measurements

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