ProtoFlux:Index Controller

From Resonite Wiki

This article or section is a Stub. You can help the Resonite Wiki by expanding it.


Index Controller
User
IsActive
Node
Type
BatteryLevel
BatteryCharging
ButtonA
ButtonB
ButtonA_Touch
ButtonB_Touch
Grip
GripTouch
GripClick
Joystick
JoystickTouch
JoystickClick
Trigger
TriggerTouch
TriggerClick
Touchpad
TouchpadTouch
TouchpadPress
TouchpadForce
Controllers

This node provides information provided by Index controllers.


Inputs

User (User)

The user to get controller information from.

Node (Chirality)

The controller side to get information from.

Outputs

IsActive (Bool)

Bool for showing if the device is active. Useful for troubleshooting if your controller is not responding.

Type (Type)

The controller type being used. (type of IndexController if exists or null)

BatteryLevel (Float)

The battery level of this controller. (1: full, 0: empty)

BatteryCharging (Bool)

Shows if the battery is currently charging.

ButtonA (Bool)

Shows if the A button is being pressed.

ButtonB (Bool)

Shows if the B button is being pressed.

ButtonA_Touch (Bool)

Shows if the capacitive touch is being pressed on A button.

ButtonB_Touch (Bool)

Shows if the capacitive touch is being pressed on B button.

Grip (Float)

Shows the strength of the grip on the device. (from 0 to 1)

GripTouch (Bool)

Shows if the grip is being touched.

GripClick (Bool)

Shows if the grip is being gripped enough to trigger a grab action.

Joystick (Float2)

The position of this controller's joystick. ([-1; -1]: backward left, [+1; +1]: forward right, [0; 0]: resting position)

JoystickTouch (Bool)

Is the controller's joystick being touched right now.

JoystickClick (Bool)

Is the controller's joystick clicked down right now.

Trigger (Float)

Shows the strength of the trigger while pressed. (from 0 to 1)

TriggerTouch (Bool)

Shows if the trigger is being touched.

TriggerClick (Bool)

Shows if the trigger is pushed enough to trigger a click action.

Touchpad (Float2)

Shows the X and Y of the area where the Touchpad is touched. ([-1; -1]: bottom left, [+1; +1]: top right, [0; 0] when untouched)

TouchpadTouch (Bool)

Shows if the touchpad being touched.

TouchpadPress (Bool)

Shows if the touchpad being touched enough to trigger a click action.

TouchpadForce (Float)

Shows the strength of the touch on the touchpad. (from 0 to 1)

Examples

Driving a blendshape with a button press

Controller nodes are commonly used to create gesture systems, where pressing a button or combination of buttons can control a blendshape, which usually are 'emotes' on avatars with custom facial expressions.

  • To define whose controller will be used in the node, you must input the User. Using the Get Active User Self node will ensure that it will always be the user of the avatar, if the flux is packed under the avatar.
  • The node input also must be input which can be Left or Right.
  • While many of the outputs are Bool, they can be easily changed to Float type by using a ZeroOne node to translate the bool to a float.
  • Getting the drive node from a blendshape, we can use that to connect to the ZeroOne node, which will 'drive' the blendshape from 0 to 1 while the button is held.

There is more detailed information on how to do this on the Gestures page.

This is an example circuit of using an A button press to control a blendshape.