![]() |
Humanoid Control for Unity v4
|
A unified method for using controller input.
ControllerInput can be used to access the state and change of input buttons, touchpads and thumbsticks on any kind of input controller including game controllers and VR/XR controllers.
You can assign controller buttons to certain functions. Controller input is split into a left and right side. For some controllers, this corresponds to the left or right controller (e.g. SteamVR or Oculus Touch controllers). For game controllers like the Xbox controller, this corresponds to the left and right side of the gamepad. Event input is using an EventHandler to define its behaviour.
Inherits MonoBehaviour.
Public Member Functions | |
void | InitializeLeftInputEvents () |
void | InitializeRightInputEvents () |
ControllerEventHandlers | GetInputEvent (bool isLeft, SideButton controllerButton) |
void | SetEventHandler (bool isLeft, SideButton sideButton, UnityAction< bool > boolEvent) |
void | SetRightTrigger1Value (float value) |
Static Public Member Functions | |
static void | SetBoolMethod (GameObject gameObject, ControllerEventHandlers eventHandlers, EventHandler.Type eventType, UnityAction< bool > boolEvent) |
Public Attributes | |
HumanoidControl | humanoid |
bool | fingerMovements = true |
Enables a built-in support for finger movements from the controller buttons. | |
GameControllers | gameController |
Selects which controller type is showed in the Inspector. | |
ControllerEventHandlers[] | leftInputEvents |
ControllerEventHandlers[] | rightInputEvents |
Protected Member Functions | |
virtual void | Awake () |
virtual void | OnDestroy () |
virtual void | Start () |
virtual void | Update () |
void | UpdateInputList (ControllerEventHandlers inputEventList, float value) |
void | UpdateFingerMovements () |
void | UpdateFingerMovementsSide (FingersTarget fingers, ControllerSide controllerSide) |
Protected Attributes | |
HandTarget | leftHandTarget |
HandTarget | rightHandTarget |
Controller | controller |
Static Protected Attributes | |
static string[] | eventTypeLabels |
bool Passer.ControllerInput.fingerMovements = true |
Enables a built-in support for finger movements from the controller buttons.
This option is only available when the Controller Input Component is attached to an Humanoid.
GameControllers Passer.ControllerInput.gameController |
Selects which controller type is showed in the Inspector.
his setting has no effect on the working of the Controller Input. It helps to determine how the actions are assigned to buttons or various supported controllers.
|
staticprotected |