ARVRController
Category: Core
A spatial node representing a spatially tracked controller.
Properties
Signals
- button_pressed ( button )
Emitted when a button on this controller is pressed.
- button_release ( int button )
Emitted when a button on this controller is released.
This is a helper spatial node that is linked to the tracking of controllers. It also offers several handy passthroughs to the state of buttons and such on the controllers.
The position of the controller node is automatically updated by the ARVR Server. This makes this node ideal to add child nodes to visualise the controller.
Property Descriptions
- controller_id
The controller’s id.
A controller id of 0 is unbound and will always result in an inactive node. Controller id 1 is reserved for the first controller that identifies itself as the left hand controller and id 2 is reserved for the first controller that identifies itself as the right hand controller.
For any other controller that the ARVRServer detects, we continue with controller id 3.
When a controller is turned off, its slot is freed. This ensures controllers will keep the same id even when controllers with lower ids are turned off.
- rumble
If active, returns the name of the associated controller if provided by the AR/VR SDK used.
- TrackerHand get_hand ( ) const
Returns the hand holding this controller, if known. See TRACKER_* constants in .
- bool get_is_active ( ) const
Returns true
if the bound controller is active. ARVR systems attempt to track active controllers.
- get_joystick_axis ( int axis ) const
Returns the value of the given axis for things like triggers, touchpads, etc. that are embedded into the controller.
- get_joystick_id ( ) const
Returns the ID of the joystick object bound to this. Every controller tracked by the ARVR Server that has buttons and axis will also be registered as a joystick within Godot. This means that all the normal joystick tracking and input mapping will work for buttons and axis found on the AR/VR controllers. This ID is purely offered as information so you can link up the controller with its joystick entry.
- int is_button_pressed ( button ) const