Enumerationmigueldeicaza.swiftgodot 0.45.0SwiftGodot
TrackerHand
XRPositionalTracker.swift:29enum TrackerHand
Cases
case unknown
The hand this tracker is held in is unknown or not applicable.
case left
This tracker is the left hand controller.
case right
This tracker is the right hand controller.
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 Signal2
Signal support.
class Signal3
Signal support.
class Signal4
Signal support.
class Signal5
Signal support.
class Signal6
Signal support.
class Signal7
Signal support.
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
Conformances
protocol CaseIterable
A type that provides a collection of all of its values.
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
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 RawRepresentable<RawValue>
A type that can be converted to and from an associated raw value.
Type members
Instance members
var debugDescription: String
A textual representation of this instance, suitable for debugging
Type features
static func != (lhs: Self, rhs: Self
) -> Bool Returns a Boolean value indicating whether two values are not equal.