XRNode3D
A spatial node that has its position automatically updated by the XRServer
.
class XRNode3D
This node can be bound to a specific pose of a XRPositionalTracker
and will automatically have its transform
updated by the XRServer
. Nodes of this type must be added as children of the XROrigin3D
node.
This object emits the following signals:
Superclasses
class Node3D
Most basic 3D game object, parent of all 3D-related nodes.
Citizens in SwiftGodot
Conformances
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol Identifiable<ID>
A class of types whose instances hold the value of an entity with stable identity.
protocol VariantRepresentable
Types that conform to VariantRepresentable can be stored directly in
Variant
with no conversion. These include all of the Variant types from Godot (for exampleGString
,Rect
,Plane
), Godot objects (those that subclass SwiftGodot.Object) as well as the built-in Swift types UInt8, Int64 and Double.protocol VariantStorable
Types that conform to VariantStorable can be stored in a Variant and can be extracted back out of a Variant.
Types
class Signal1
Signal support.
Type members
Instance members
var pose: StringName
The name of the pose we’re bound to. Which poses a tracker supports is not known during design time.
var showWhenTracked: Bool
Enables showing the node when tracking starts, and hiding the node when tracking is lost.
var tracker: StringName
The name of the tracker we’re bound to. Which trackers are available is not known during design time.
var trackingChanged: Signal1
Emitted when the
tracker
starts or stops receiving updated tracking data for thepose
being tracked. Thetracking
argument indicates whether the tracker is getting updated tracking data.func getHasTrackingData(
) -> Bool Returns
true
if thetracker
has current tracking data for thepose
being tracked.func getIsActive(
) -> Bool Returns
true
if thetracker
has been registered and thepose
is being tracked.func getPose(
) -> XRPose? Returns the
XRPose
containing the current state of the pose being tracked. This gives access to additional properties of this pose.func triggerHapticPulse(actionName: String, frequency: Double, amplitude: Double, durationSec: Double, delaySec: Double
) Triggers a haptic pulse on a device associated with this interface.
Subclasses
class XRAnchor3D
An anchor point in AR space.
class XRController3D
A spatial node representing a spatially-tracked controller.