docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method GetAxisValue

    GetAxisValue(int)

    Get the value of the input axis

    Declaration
    float GetAxisValue(int axis)
    Parameters
    Type Name Description
    int axis

    Which axis to query: 0, 1, or 2. These represent, respectively, the X, Y, and Z axes

    Returns
    Type Description
    float

    The input value of the axis queried

    In This Article
    Back to top
    Copyright © 2023 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)