docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct DefaultInputAxisDriver

    This object drives an input axis.
    It reads raw input, applies it to the axis value, with acceleration and deceleration.

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

    Fields

    AccelTime

    The amount of time in seconds it takes to accelerate to MaxSpeed with the supplied Axis at its maximum value

    Declaration
    [Tooltip("The amount of time in seconds it takes to accelerate to MaxSpeed with the supplied Axis at its maximum value")]
    public float AccelTime
    Field Value
    Type Description
    float

    DecelTime

    The amount of time in seconds it takes to decelerate the axis to zero if the supplied axis is in a neutral position

    Declaration
    [Tooltip("The amount of time in seconds it takes to decelerate the axis to zero if the supplied axis is in a neutral position")]
    public float DecelTime
    Field Value
    Type Description
    float

    Properties

    Default

    Default value

    Declaration
    public static DefaultInputAxisDriver Default { get; }
    Property Value
    Type Description
    DefaultInputAxisDriver

    Methods

    ProcessInput(ref InputAxis, float, float)

    Apply the input value to the axis value

    Declaration
    public void ProcessInput(ref InputAxis axis, float inputValue, float deltaTime)
    Parameters
    Type Name Description
    InputAxis axis

    The InputAxisValue to update

    float inputValue

    The input value to apply to the axis value.

    float deltaTime

    current deltaTime

    Reset(ref InputAxis)

    Reset an axis to at-rest state

    Declaration
    public void Reset(ref InputAxis axis)
    Parameters
    Type Name Description
    InputAxis axis

    The axis to reset

    Validate()

    Call from OnValidate: Make sure the fields are sensible

    Declaration
    public void Validate()
    In This Article
    Back to top
    Copyright © 2025 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)