Struct AccelerometerSensor | Project Tiny | 0.31.0-preview.24
docs.unity.cn
    Show / Hide Table of Contents

    Struct AccelerometerSensor

    Use the accelerometer to measure the acceleration of a device. It reports the acceleration measured on a device both due to moving the device around, and due to gravity pulling the device down. Use Acceleration property (float3) to get acceleration values. Values are affected by the InputSystem.CompensateForScreenOrientation setting.

    Namespace: Unity.Tiny.Input
    Syntax
    public struct AccelerometerSensor : IComponentData

    Fields

    Acceleration

    Declaration
    public float3 Acceleration
    Field Value
    Type Description
    Unity.Mathematics.float3

    LastUpdateTime

    Declaration
    public TimeData LastUpdateTime
    Field Value
    Type Description
    TimeData
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on 06 November 2020