Struct AccelerometerSensor | Project Tiny | 0.28.0-preview.40
docs.unity3d.com
    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 © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023