ProtoFlux:Index Controller: Difference between revisions

From Resonite Wiki
Added missing joystick output descriptions.
added infos on value ranges
 
(One intermediate revision by one other user not shown)
Line 39: Line 39:




== Usage ==
== Inputs ==
 
=== User ([[User]]) ===
 
The user to get controller information from.
 
=== Node ([[Type:Chirality|Chirality]]) ===
 
The controller side to get information from.
 
== Outputs ==
=== IsActive ([[Type:Bool|Bool]]) ===
=== IsActive ([[Type:Bool|Bool]]) ===


Line 45: Line 55:


=== Type ([[Type:Type|Type]]) ===
=== Type ([[Type:Type|Type]]) ===
The controller type being used. (type of [[Type:IndexController|IndexController]] if exists or <code>null</code>)


=== BatteryLevel ([[Type:Float|Float]]) ===
=== BatteryLevel ([[Type:Float|Float]]) ===


Shows the battery level of the device from 1 to 0.
The battery level of this controller. (<code>1</code>: full, <code>0</code>: empty)


=== BatteryCharging ([[Type:Bool|Bool]]) ===
=== BatteryCharging ([[Type:Bool|Bool]]) ===
Line 72: Line 84:
=== Grip ([[Type:Float|Float]]) ===
=== Grip ([[Type:Float|Float]]) ===


Shows the strength of the grip on the device.
Shows the strength of the grip on the device. (from <code>0</code> to <code>1</code>)


=== GripTouch ([[Type:Bool|Bool]]) ===
=== GripTouch ([[Type:Bool|Bool]]) ===
Line 84: Line 96:
=== Joystick ([[Type:Float2|Float2]]) ===
=== Joystick ([[Type:Float2|Float2]]) ===


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


=== JoystickTouch ([[Type:Bool|Bool]]) ===
=== JoystickTouch ([[Type:Bool|Bool]]) ===
Line 96: Line 108:
=== Trigger ([[Type:Float|Float]]) ===
=== Trigger ([[Type:Float|Float]]) ===


Shows the strength of the trigger while pressed.
Shows the strength of the trigger while pressed. (from <code>0</code> to <code>1</code>)


=== TriggerTouch ([[Type:Bool|Bool]]) ===
=== TriggerTouch ([[Type:Bool|Bool]]) ===
Line 108: Line 120:
=== Touchpad ([[Type:Float2|Float2]]) ===
=== Touchpad ([[Type:Float2|Float2]]) ===


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


=== TouchpadTouch ([[Type:Bool|Bool]]) ===
=== TouchpadTouch ([[Type:Bool|Bool]]) ===


Shows if the touchpad being touched.
Shows if the touchpad being touched.
=== TouchpadPress ([[Type:Bool|Bool]]) ===
Shows if the touchpad being touched enough to trigger a click action.


=== TouchpadForce ([[Type:Float|Float]]) ===
=== TouchpadForce ([[Type:Float|Float]]) ===


Shows the strength of the touch on the touchpad.
Shows the strength of the touch on the touchpad. (from <code>0</code> to <code>1</code>)


== Examples ==
== Examples ==
Line 134: Line 150:




[[Category:ProtoFlux:Devices]]
[[Category:ProtoFlux:Devices:Controllers]]
[[Category:ProtoFlux:Devices:Controllers]]

Latest revision as of 22:05, 14 May 2024

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.