![]() |
Humanoid Control for Unity v4
|
Controller input for the left or right side of the controller (pair)
Public Member Functions | |
| delegate void | OnButtonDown (Controller.Button buttonNr) |
| Function for processing button down events. | |
| delegate void | OnButtonUp (Controller.Button buttonNr) |
| Function for processing button up events. | |
| void | Update () |
| Update the current values of the controller input. | |
| void | Clear () |
| Reset the values of all buttons. | |
| bool | GetButton (Controller.Button buttonID) |
| Retrieve the pressed state of a button. | |
Public Attributes | |
| float | stickHorizontal |
| The vertical value of the thumbstick. | |
| float | stickVertical |
| The horizontal value of the thumbstick. | |
| bool | stickButton |
| The pressed state of the thumbstick. | |
| bool | stickTouch |
| The touched state of the thumbstick. | |
| float | touchpadVertical |
| The vertical value of the touchpad. | |
| float | touchpadHorizontal |
| The horizontal value of the touchpad. | |
| bool | touchpadPress |
| The pressed state of the touchpad. | |
| bool | touchpadTouch |
| The touched state of the touchpad. | |
| bool[] | buttons = new bool[4] |
| The pressed state of genertic buttons. | |
| float | trigger1 |
| The value of the first trigger. | |
| float | trigger2 |
| The value of the second trigger. | |
| bool | option |
| The pressed state of the option button. | |
Events | |
| OnButtonDown | OnButtonDownEvent |
| Event for handling Button down events. | |
| OnButtonUp | OnButtonUpEvent |
| Event for handling Button up events. | |
| delegate void Passer.ControllerSide.OnButtonDown | ( | Controller.Button | buttonNr | ) |
Function for processing button down events.
| buttonNr | The idetification of the pressed button |
| delegate void Passer.ControllerSide.OnButtonUp | ( | Controller.Button | buttonNr | ) |
Function for processing button up events.
| buttonNr | The identification of the released button |
| bool Passer.ControllerSide.GetButton | ( | Controller::Button | buttonID | ) |
Retrieve the pressed state of a button.
| buttonID | The identification of the requested button |
| float Passer.ControllerSide.stickHorizontal |
The vertical value of the thumbstick.
Values: -1..1
| float Passer.ControllerSide.stickVertical |
The horizontal value of the thumbstick.
Values: -1..1
| float Passer.ControllerSide.touchpadVertical |
The vertical value of the touchpad.
Values: -1..1
| float Passer.ControllerSide.touchpadHorizontal |
The horizontal value of the touchpad.
Values: -1..1
| bool [] Passer.ControllerSide.buttons = new bool[4] |
The pressed state of genertic buttons.
There can be up to 4 generic buttons. buttons[0] usually mathes the default fire button
| float Passer.ControllerSide.trigger1 |
The value of the first trigger.
Values: 0..1 The first trigger is normally operated with the index finger
| float Passer.ControllerSide.trigger2 |
The value of the second trigger.
Values: 0..1 The second trigger is normally operated with the middle finger
| bool Passer.ControllerSide.option |
The pressed state of the option button.
The option button is usually a special button for accessing a specific menu