Struct AxisState
AxisState is deprecated. Use InputAxis instead.
Inherited Members
Namespace: Unity.Cinemachine
Assembly: solution.dll
Syntax
[Serializable]
[Obsolete("AxisState is deprecated. Use InputAxis instead")]
public struct AxisState
Constructors
Name | Description |
---|---|
AxisState(float, float, bool, bool, float, float, float, string, bool) | Constructor with specific values |
Fields
Name | Description |
---|---|
Value | The current value of the axis |
m_AccelTime | The amount of time in seconds it takes to accelerate to MaxSpeed with the supplied Axis at its maximum value |
m_DecelTime | The amount of time in seconds it takes to decelerate the axis to zero if the supplied axis is in a neutral position |
m_InputAxisName | The name of this axis as specified in Unity Input manager. Setting to an empty string will disable the automatic updating of this axis |
m_InputAxisValue | The value of the input axis. A value of 0 means no input You can drive this directly from a custom input system, or you can set the Axis Name and have the value driven by the internal Input Manager |
m_InvertInput | If checked, then the raw value of the input axis will be inverted before it is used. |
m_MaxSpeed | How fast the axis value can travel. Increasing this number makes the behaviour more responsive to joystick input |
m_MaxValue | The maximum value for the axis |
m_MinValue | The minimum value for the axis |
m_Recentering | Automatic recentering. Valid only if HasRecentering is true |
m_SpeedMode | How to interpret the Max Speed setting. |
m_Wrap | If checked, then the axis will wrap around at the min/max values, forming a loop |
Properties
Name | Description |
---|---|
HasInputProvider | Returns true if this axis has an InputAxisProvider, in which case we ignore the input axis name |
HasRecentering | True if the Recentering member is valid (bcak-compatibility support: old versions had recentering in a separate structure) |
ValueRangeLocked | Value range is locked, i.e. not adjustable by the user (used by editor) |
Methods
Name | Description |
---|---|
Reset() | Cancel current input state and reset input to 0 |
SetInputAxisProvider(int, IInputAxisProvider) | Set an input provider for this axis. If an input provider is set, the provider will be queried when user input is needed, and the Input Axis Name field will be ignored. If no provider is set, then the legacy Input system will be queried, using the Input Axis Name. |
Update(float) | Updates the state of this axis based on the Input axis defined by AxisState.m_AxisName |
Validate() | Call from OnValidate: Make sure the fields are sensible |