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.xml6
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/classes/NavigationPolygon.xml b/doc/classes/NavigationPolygon.xml
index 5b5b7c42ef..ee57d8f26b 100644
--- a/doc/classes/NavigationPolygon.xml
+++ b/doc/classes/NavigationPolygon.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NavigationPolygon" inherits="Resource" version="4.0">
+<class name="NavigationPolygon" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
A node that has methods to draw outlines or use indices of vertices to create navigation polygons.
</brief_description>
@@ -28,7 +28,7 @@
var polygon = NavigationPolygon.new()
var vertices = PackedVector2Array([Vector2(0, 0), Vector2(0, 50), Vector2(50, 50), Vector2(50, 0)])
polygon.vertices = vertices
- var indices = PackedInt32Array(0, 3, 1)
+ var indices = PackedInt32Array([0, 1, 2, 3])
polygon.add_polygon(indices)
$NavigationRegion2D.navpoly = polygon
[/gdscript]
@@ -36,7 +36,7 @@
var polygon = new NavigationPolygon();
var vertices = new Vector2[] { new Vector2(0, 0), new Vector2(0, 50), new Vector2(50, 50), new Vector2(50, 0) };
polygon.Vertices = vertices;
- var indices = new int[] { 0, 3, 1 };
+ var indices = new int[] { 0, 1, 2, 3 };
polygon.AddPolygon(indices);
GetNode&lt;NavigationRegion2D&gt;("NavigationRegion2D").Navpoly = polygon;
[/csharp]