Signal2
Signal support.
XRPositionalTracker.swift:666class Signal2
Use the connect(flags:_:)
method to connect to the signal on the container object, and disconnect(_:)
to drop the connection.
You can also await the emitted
property for waiting for a single emission of the signal.
Other members in extension
View members
Hide members
This section is hidden by default because it contains too many (26) members.
Types
class Signal1
Signal support.
class Signal3
Signal support.
class Signal4
Signal support.
class Signal5
Signal support.
class Signal6
Signal support.
class Signal7
Signal support.
enum TrackerHand
Type members
Instance members
var additionalDescription: String
The description of this tracker.
var hand: XRPositionalTracker.TrackerHand
Defines which hand this tracker relates to.
var inputFloatChanged: Signal5
Emitted when a trigger or similar input on this tracker changes value.
var inputVector2Changed: Signal6
Emitted when a thumbstick or thumbpad on this tracker moves.
var name: StringName
The unique name of this tracker. The trackers that are available differ between various XR runtimes and can often be configured by the user. Godot maintains a number of reserved names that it expects the
XRInterface
to implement if applicable:var poseChanged: Signal1
Emitted when the state of a pose tracked by this tracker changes.
var poseLostTracking: Signal2
Emitted when a pose tracked by this tracker stops getting updated tracking data.
var profile: String
The profile associated with this tracker, interface dependent but will indicate the type of controller being tracked.
var profileChanged: Signal7
Emitted when the profile of our tracker changes.
var type: XRServer.TrackerType
The type of tracker.
func getInput(name: StringName
) -> Variant Returns an input for this tracker. It can return a boolean, float or
Vector2
value depending on whether the input is a button, trigger or thumbstick/thumbpad.func getPose(name: StringName
) -> XRPose? Returns the current
XRPose
state object for the boundname
pose.func hasPose(name: StringName
) -> Bool Returns
true
if the tracker is available and is currently tracking the boundname
pose.func invalidatePose(name: StringName
) Marks this pose as invalid, we don’t clear the last reported state but it allows users to decide if trackers need to be hidden if we lose tracking or just remain at their last known position.
func setInput(name: StringName, value: Variant
) Changes the value for the given input. This method is called by a
XRInterface
implementation and should not be used directly.func setPose(name: StringName, transform: Transform3D, linearVelocity: Vector3, angularVelocity: Vector3, trackingConfidence: XRPose.TrackingConfidence
) Sets the transform, linear velocity, angular velocity and tracking confidence for the given pose. This method is called by a
XRInterface
implementation and should not be used directly.
Citizens in SwiftGodot
Instance members
var emitted: Void
You can await this property to wait for the signal to be emitted once
func connect(flags: Object.ConnectFlags, @escaping (_ pose: XRPose) -> ()
) -> Object Connects the signal to the specified callback
func disconnect(Object
) Disconnects a signal that was previously connected, the return value from calling
connect(flags:_:)