ARVRController

A spatial node representing a spatially tracked controller.

This is a helper spatial node that is linked to the tracking of controllers. It also offers several handy pass throughs to the state of buttons and such on the controllers. Controllers are linked by their id. You can create controller nodes before the controllers are available. Say your game always uses two controllers (one for each hand) you can predefine the controllers with id 1 and 2 and they will become active as soon as the controllers are identified. If you expect additional controllers to be used you should react to the signals and add ARVRController nodes to your scene. 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.

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Functions

getControllerId
long getControllerId()
getControllerName
String getControllerName()

If active, returns the name of the associated controller if provided by the AR/VR SDK used.

getHand
ARVRPositionalTracker.TrackerHand getHand()

Returns the hand holding this controller, if known. See TRACKER_* constants in ARVRPositionalTracker.

getIsActive
bool getIsActive()

Returns true if the bound controller is active. ARVR systems attempt to track active controllers.

getJoystickAxis
double getJoystickAxis(long axis)

Returns the value of the given axis for things like triggers, touchpads, etc. that are embedded into the controller.

getJoystickId
long getJoystickId()

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.

getRumble
double getRumble()
isButtonPressed
long isButtonPressed(long button)

Returns true if the button at index button is pressed.

opAssign
ARVRController opAssign(T n)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(ARVRController other)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(typeof(null) n)
Undocumented in source. Be warned that the author may not have intended to support it.
setControllerId
void setControllerId(long controller_id)
setRumble
void setRumble(double rumble)

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

controllerId
long controllerId [@property getter]
long controllerId [@property setter]

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
double rumble [@property getter]
double rumble [@property setter]

The degree to which the tracker rumbles. Ranges from 0.0 to 1.0 with precision .01. If changed, updates ARVRPositionalTracker.rumble accordingly.

Static functions

_new
ARVRController _new()
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

_classBinding
struct _classBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
ToRef as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta