summaryrefslogtreecommitdiff
path: root/doc/classes/NavigationPolygon.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/NavigationPolygon.xml')
-rw-r--r--doc/classes/NavigationPolygon.xml12
1 files changed, 5 insertions, 7 deletions
diff --git a/doc/classes/NavigationPolygon.xml b/doc/classes/NavigationPolygon.xml
index 4ede80b98c..2630ae1377 100644
--- a/doc/classes/NavigationPolygon.xml
+++ b/doc/classes/NavigationPolygon.xml
@@ -1,32 +1,30 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NavigationPolygon" inherits="Resource" category="Core" version="3.1">
+<class name="NavigationPolygon" inherits="Resource" category="Core" version="3.2">
<brief_description>
A node that has methods to draw outlines or use indices of vertices to create navigation polygons.
</brief_description>
<description>
There are two ways to create polygons. Either by using the [method add_outline] method or using the [method add_polygon] method.
Using [method add_outline]:
- [code]
+ [codeblock]
var polygon = NavigationPolygon.new()
var outline = PoolVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)])
polygon.add_outline(outline)
polygon.make_polygons_from_outlines()
$NavigationPolygonInstance.navpoly = polygon
- [/code]
+ [/codeblock]
Using [method add_polygon] and indices of the vertices array.
- [code]
+ [codeblock]
var polygon = NavigationPolygon.new()
var vertices = PoolVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)])
polygon.set_vertices(vertices)
var indices = PoolIntArray(0, 3, 1)
polygon.add_polygon(indices)
$NavigationPolygonInstance.navpoly = polygon
- [/code]
+ [/codeblock]
</description>
<tutorials>
</tutorials>
- <demos>
- </demos>
<methods>
<method name="add_outline">
<return type="void">