m categories. yea. |
m Added example. |
||
Line 107: | Line 107: | ||
== Examples == | == 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 [[ProtoFlux:Get_Active_User_Self|Get Active User Self]] node will ensure that it will always be the user of the avatar, if the flux is [[ProtoFlux_Tool#Packing_ProtoFlux_nodes|packed]] under the avatar. | |||
* The node input also must be input which can be Left or Right. | |||
* While many of the outputs are [[Type:bool|Bool]], they can be easily changed to [[Type:float|Float]] type by using a [[ProtoFlux:Zero_One|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|Gestures]] page. | |||
[[File:Indexcontroller_to_float.jpg|800px|thumb|left|This is an example circuit of using an A button press to control a blendshape.]] | |||
[[Category:ProtoFlux:Devices]] | [[Category:ProtoFlux:Devices]] | ||
[[Category:ProtoFlux:Devices:Controllers]] | [[Category:ProtoFlux:Devices:Controllers]] |
Revision as of 22:50, 12 April 2024
This article or section is a Stub. You can help the Resonite Wiki by expanding it.
This node provides information provided by Index controllers.
Usage
IsActive (Bool)
Bool for showing if the device is active. Useful for troubleshooting if your controller is not responding.
Type (Type)
BatteryLevel (Float)
Shows the battery level of the device from 1 to 0.
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.
GripTouch (Bool)
Shows if the grip is being touched.
GripClick (Bool)
Shows if the grip is being gripped enough to trigger a grab action.
Trigger (Float)
Shows the strength of the trigger while pressed.
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.
TouchpadTouch (Bool)
Shows if the touchpad being touched.
TouchpadForce (Float)
Shows the strength of the touch on the touchpad.
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.