Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
XRPose
繼承: RefCounted < Object
這個物件包含了追蹤物件姿勢相關的所有資料。
說明
XR 運作時通常可以識別裝置上的多個位置,例如空間追蹤的控制器。
XR 運作時會為每個姿勢都提供朝向、位置、線速度和角速度。這個物件包含某個姿勢的狀態。
教學
屬性
|
||
|
||
|
||
|
||
|
||
|
方法
get_adjusted_transform() const |
列舉
enum TrackingConfidence: 🔗
TrackingConfidence XR_TRACKING_CONFIDENCE_NONE = 0
此姿勢沒有可用的追蹤資訊。
TrackingConfidence XR_TRACKING_CONFIDENCE_LOW = 1
追蹤資訊可能不準確或是估計而來的。例如,對於內向外型追蹤,這表示的是控制器可能被(部分)遮擋。
TrackingConfidence XR_TRACKING_CONFIDENCE_HIGH = 2
Tracking information is considered accurate and up to date.
屬性說明
Vector3 angular_velocity = Vector3(0, 0, 0) 🔗
該姿勢的角速度。
bool has_tracking_data = false 🔗
如果為 true,則我們的追蹤資料是最新的。如果為 false,我們將不再接收新的追蹤資料,並且我們的狀態是最後一個有效狀態。
Vector3 linear_velocity = Vector3(0, 0, 0) 🔗
該姿勢的線速度。
StringName name = &"" 🔗
void set_name(value: StringName)
StringName get_name()
The name of this pose. Usually, this name is derived from an action map set up by the user. Godot also suggests some pose names that XRInterface objects are expected to implement:
rootis the root location, often used for tracked objects that do not have further nodes.aimis the tip of a controller with its orientation pointing outwards, often used for raycasts.gripis the location where the user grips the controller.skeletonis the root location for a hand mesh, when using hand tracking and an animated skeleton is supplied by the XR runtime.
TrackingConfidence tracking_confidence = 0 🔗
void set_tracking_confidence(value: TrackingConfidence)
TrackingConfidence get_tracking_confidence()
此姿勢的追蹤置信度,提供了有關此記錄的空間定位準確度的洞察力。
Transform3D transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0) 🔗
void set_transform(value: Transform3D)
Transform3D get_transform()
該變換包含由 XR 運作時報告的原點和變換。
方法說明
Transform3D get_adjusted_transform() const 🔗