Struct DefaultInputAxisDriver
This object drives an input axis.
It reads raw input, applies it to the axis value, with acceleration and deceleration.
Namespace: Unity.Cinemachine
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 |
---|---|
Single |
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 |
---|---|
Single |
Properties
Default
Default value
Declaration
public static readonly DefaultInputAxisDriver Default { get; }
Property Value
Type | Description |
---|---|
DefaultInputAxisDriver |
Methods
ProcessInput(ref InputAxis, Single, Single)
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 |
Single | inputValue | Parameter for controlling the behaviour of the axis |
Single | 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()