blob: 6e11034073798f9384929132e8608fae94e5a1c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
<?xml version="1.0" encoding="UTF-8" ?>
<class name="ARVRAnchor" inherits="Spatial" category="Core" version="3.0.alpha.custom_build">
<brief_description>
Anchor point in AR Space
</brief_description>
<description>
The ARVR Anchor point is a spatial node 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 and the nodes will simply remain on 0,0,0 until a plane is recognised.
Keep in mind that as long as plane detection is enable the size, placing and orientation of an anchor will be updates as the detection logic learns more about the real world out there especially if only part of the surface is in view.
</description>
<tutorials>
</tutorials>
<demos>
</demos>
<methods>
<method name="get_anchor_id" qualifiers="const">
<return type="int">
</return>
<description>
Returns the anchor id for this anchor.
</description>
</method>
<method name="get_anchor_name" qualifiers="const">
<return type="String">
</return>
<description>
Returns the name given to this anchor.
</description>
</method>
<method name="get_is_active" qualifiers="const">
<return type="bool">
</return>
<description>
Returns true if the anchor is being tracked and false if no anchor with this id is currently known.
</description>
</method>
<method name="get_plane" qualifiers="const">
<return type="Plane">
</return>
<description>
Returns a plane aligned with our anchor, handy for intersection testing
</description>
</method>
<method name="get_size" qualifiers="const">
<return type="Vector3">
</return>
<description>
Returns the estimated size of the plane that was detected. Say when the anchor relates to a table in the real world, this is the estimated size of the surface of that table.
</description>
</method>
<method name="set_anchor_id">
<return type="void">
</return>
<argument index="0" name="anchor_id" type="int">
</argument>
<description>
Binds this anchor node to an anchor with this id. You can set this before the anchor itself exists. The first anchor that is identified gets id 1, the second id 2, etc. When anchors get removed that slot remains free and can be assigned to the next anchor that is identified. The most common situation where anchors 'disappear' is when the AR server identifies that two anchors represent different parts of the same plane and merge them.
</description>
</method>
</methods>
<members>
<member name="anchor_id" type="int" setter="set_anchor_id" getter="get_anchor_id">
</member>
</members>
<constants>
</constants>
</class>
|