ProtoFlux:StandardController
More actions
Usage
The standard controller node allows one to interact with the players virtual reality controller as well as generic inputs on Desktop mode.
Say you want to get the user's grip and trigger strength, just feed it a user and a "Chirality input" for the left or right controller and volla!
Just pull an output from the grip boolean and the strength float value and now you have the users grip and trigger on/off and strength!
Desktop mode
This node works for users in desktop('screen') mode too:
- Type becomes:
FrooxEngine.VirtualController - While either Chirality options activate the node, only Primary Hand(chosen in settings) will respond to inputs. Use UserPrimaryHand to select that node.
- Primary may not always work as expected, when holding an object it seems to need a TouchButton to activate.
- When primary is pressed,
Strengthis always1
User (User)
The user to get controller information from.
Node (Chirality)
The controller side to get information from.
Outputs
IsActive (bool)
Is this controller actively being used right now.
Type (Type)
The controller type being used. (a subtype of IStandardController if a controller exists or null if not)
BatteryLevel (float)
The battery level of this controller. (1: full, 0: empty, -1: battery level not available)
IsBatteryCharging (bool)
Is this controller currently charging.
Primary (bool)
Is primary pressed right now.
Secondary (bool)
Is secondary pressed right now.
Grab (bool)
Is the controller's grip button pressed right now.
Menu (bool)
Is the menu button being pressed right now.
Strength (float)
How much the trigger is pressed currently. (from 0 to 1)
Axis (float2)
The position of this controller's joystick or touchpad depending on controller type. ([-1; -1]: bottom left, [+1; +1]: top right, [0; 0] for touchpads that are untouched)
Index Controllers have both types of input. Axis returns the touchpad position.