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...
XRAnchor3D
繼承: XRNode3D < Node3D < Node < Object
AR 空間中的錨點。
說明
The XRAnchor3D point is an XRNode3D that maps a real world location identified by the AR platform to a position within the game world. For example, as long as plane detection in ARKit is on, ARKit will identify and update the position of planes (tables, floors, etc.) and create anchors for them.
This node is mapped to one of the anchors through its unique ID. When you receive a signal that a new anchor is available, you should add this node to your scene for that anchor. You can predefine nodes and set the ID; the nodes will simply remain on (0, 0, 0) until a plane is recognized.
Keep in mind that, as long as plane detection is enabled, the size, placing and orientation of an anchor will be updated as the detection logic learns more about the real world out there especially if only part of the surface is in view.
教學
方法
get_plane() const |
|
get_size() const |
方法說明
返回一個與我們的錨點對齊的平面;方便進行交集測試。
返回偵測到的平面的估計尺寸。比如當錨點與現實世界中的一張桌子有關時,這就是該桌子表面的估計尺寸。