XRPose
This object contains all data related to a pose on a tracked object.
XRPose.swift:14class XRPose
XR runtimes often identify multiple locations on devices such as controllers that are spatially tracked.
Orientation, location, linear velocity and angular velocity are all provided for each pose by the XR runtime. This object contains this state of a pose.
Superclasses
class RefCounted
Base class for reference-counted objects.
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
Type members
Instance members
var angularVelocity: Vector3
The angular velocity for this pose.
var hasTrackingData: Bool
If
true
our tracking data is up to date. Iffalse
we’re no longer receiving new tracking data and our state is whatever that last valid state was.var linearVelocity: Vector3
The linear velocity of this pose.
var name: StringName
The name of this pose. Pose names are often driven by an action map setup by the user. Godot does suggest a number of pose names that it expects
XRInterface
s to implement:var trackingConfidence: XRPose.TrackingConfidence
The tracking confidence for this pose, provides insight on how accurate the spatial positioning of this record is.
var transform: Transform3D
The transform containing the original and transform as reported by the XR runtime.
func getAdjustedTransform(
) -> Transform3D Returns the
transform
with world scale and our reference frame applied. This is the transform used to positionXRNode3D
objects.