Struct AxisState
Axis state for defining how to react to player input. The settings here control the responsiveness of the axis to player input.
상속된 멤버
네임스페이스: Cinemachine
어셈블리: solution.dll
구문
[DocumentationSorting(DocumentationSortingAttribute.Level.UserRef)]
[Serializable]
public struct AxisState
생성자
| 이름 | 설명 |
|---|---|
| AxisState(float, float, bool, bool, float, float, float, string, bool) | Constructor with specific values |
필드
| 이름 | 설명 |
|---|---|
| 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 |
프로퍼티
| 이름 | 설명 |
|---|---|
| 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) |
메서드
| 이름 | 설명 |
|---|---|
| Reset() | |
| Update(float) | Updates the state of this axis based on the axis defined by AxisState.m_AxisName |
| Validate() | Call from OnValidate: Make sure the fields are sensible |