InputAxisActivator - CodingDino/Dino-Unity-Toolkit GitHub Wiki
The InputAxisActivator component triggers an action whenever a specified input axis is used. Input axis are two linked inputs, such as two keys (a-d and w-s or the arrow keys), opposite values on a D-Pad, thumb-sticks, or a pair of shoulder triggers on a gamepad. They are used to control things like character movement - anything that has a positive and negative side. They can be set up in Unity's InputManager.
This is an Activator component, and does nothing on its own, instead triggering a linked Action component. Actions, Activators, and Data make up the core system for the Dino Unity Toolkit.
Image: An InputAxisActivator set up to move a character left or right.
Properties
Conditions
These are the conditions which must be met in order for the actions to be triggered.
Property: | Description: |
---|---|
Axis Name | The axis the player must use to activate these actions. Axis must be set up in Unity's InputManager and must match the name EXACTLY. |
Cooldown | How frequently can this activation happen, in seconds? Use 0 for no limit. |
Actions
These are the lists of actions that will be activated when the above conditions are met
Property: | Description: |
---|---|
On Axis Changed () | Activates when the axis changes from its previous value. |
On Axis Start () | Activates when the axis becomes non-zero. |
On Axis End () | Activates when the axis becomes zero. |
On Axis Active () | Activates every frame while the axis is non-zero. |