docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct InputMotionData_t

    The Steamworks InputMotionData_t struct.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Unity.Steamworks.Interop
    Assembly: Unity.Steamworks.Interop.dll
    Syntax
    [Serializable]
    public struct InputMotionData_t

    Fields

    posAccelX

    Positional acceleration This represents only the latest hardware packet's state. Values range from -SHRT_MAX..SHRT_MAX This represents -2G..+2G along each axis +tive when controller's Right hand side is pointed toward the sky.

    Declaration
    public float posAccelX
    Field Value
    Type Description
    float

    posAccelY

    +tive when controller's charging port (forward side of controller) is pointed toward the sky.

    Declaration
    public float posAccelY
    Field Value
    Type Description
    float

    posAccelZ

    +tive when controller's sticks point toward the sky.

    Declaration
    public float posAccelZ
    Field Value
    Type Description
    float

    rotQuatW

    The rotQuatW field of InputMotionData_t.

    Declaration
    public float rotQuatW
    Field Value
    Type Description
    float

    rotQuatX

    Gyro Quaternion: Absolute rotation of the controller since wakeup, using the Accelerometer reading at startup to determine the first value. This means real world "up" is know, but heading is not known. Every rotation packet is integrated using sensor time delta, and that change is used to update this quaternion. A Quaternion Identity ( x:0, y:0, z:0, w:1 ) will be sent in the first few packets while the controller's IMU is still waking up; some controllers have a short "warmup" period before these values should be used. After the first time GetMotionData is called per controller handle, the IMU will be active until your app is closed. The exception is the Sony Dualshock, which will stay on until the controller has been turned off. Filtering: When rotating the controller at low speeds, low level noise is filtered out without noticeable latency. High speed movement is always unfiltered. Drift: Gyroscopic "Drift" can be fixed using the Steam Input "Gyro Calibration" button. Users will have to be informed of this feature.

    Declaration
    public float rotQuatX
    Field Value
    Type Description
    float

    rotQuatY

    The rotQuatY field of InputMotionData_t.

    Declaration
    public float rotQuatY
    Field Value
    Type Description
    float

    rotQuatZ

    The rotQuatZ field of InputMotionData_t.

    Declaration
    public float rotQuatZ
    Field Value
    Type Description
    float

    rotVelX

    Angular velocity Values range from -SHRT_MAX..SHRT_MAX These values map to a real world range of -2000..+2000 degrees per second on each axis (SDL standard) This represents only the latest hardware packet's state. Local Pitch

    Declaration
    public float rotVelX
    Field Value
    Type Description
    float

    rotVelY

    Local Roll

    Declaration
    public float rotVelY
    Field Value
    Type Description
    float

    rotVelZ

    Local Yaw

    Declaration
    public float rotVelZ
    Field Value
    Type Description
    float
    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)