XRNode3D

Inherits:Node3D<Node<Object

Inherited By:XRAnchor3D,XRController3D

A 3D node that has its position automatically updated by theXRServer.

Description

This node can be bound to a specific pose of aXRPositionalTracker and will automatically have itsNode3D.transform updated by theXRServer. Nodes of this type must be added as children of theXROrigin3D node.

Tutorials

Properties

StringName

pose

&"default"

bool

show_when_tracked

false

StringName

tracker

&""

Methods

bool

get_has_tracking_data()const

bool

get_is_active()const

XRPose

get_pose()

void

trigger_haptic_pulse(action_name:String, frequency:float, amplitude:float, duration_sec:float, delay_sec:float)


Signals

tracking_changed(tracking:bool)🔗

Emitted when thetracker starts or stops receiving updated tracking data for thepose being tracked. Thetracking argument indicates whether the tracker is getting updated tracking data.


Property Descriptions

StringNamepose =&"default"🔗

The name of the pose we're bound to. Which poses a tracker supports is not known during design time.

Godot defines number of standard pose names such asaim andgrip but other may be configured within a givenXRInterface.


boolshow_when_tracked =false🔗

Enables showing the node when tracking starts, and hiding the node when tracking is lost.


StringNametracker =&""🔗

The name of the tracker we're bound to. Which trackers are available is not known during design time.

Godot defines a number of standard trackers such asleft_hand andright_hand but others may be configured within a givenXRInterface.


Method Descriptions

boolget_has_tracking_data()const🔗

Returnstrue if thetracker has current tracking data for thepose being tracked.


boolget_is_active()const🔗

Returnstrue if thetracker has been registered and thepose is being tracked.


XRPoseget_pose()🔗

Returns theXRPose containing the current state of the pose being tracked. This gives access to additional properties of this pose.


voidtrigger_haptic_pulse(action_name:String, frequency:float, amplitude:float, duration_sec:float, delay_sec:float)🔗

Triggers a haptic pulse on a device associated with this interface.

action_name is the name of the action for this pulse.

frequency is the frequency of the pulse, set to0.0 to have the system use a default frequency.

amplitude is the amplitude of the pulse between0.0 and1.0.

duration_sec is the duration of the pulse in seconds.

delay_sec is a delay in seconds before the pulse is given.


User-contributed notes

Please read theUser-contributed notes policy before submitting a comment.