summaryrefslogtreecommitdiff
path: root/doc/classes/SurfaceTool.xml
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-02-22 20:06:58 +0100
committerGitHub <noreply@github.com>2022-02-22 20:06:58 +0100
commite17c29ab80e9bf4ac6ccf60e023252b3113cbf39 (patch)
treea598029830a429ed2dabcdc8953ad0a9569dffa3 /doc/classes/SurfaceTool.xml
parente0d18071a60fd40d5256f184167673dfa1e468c8 (diff)
parentb5f7910ca07ff0860f78007e47d0a766adcc3563 (diff)
Merge pull request #58440 from novaplusplus/novas-doc-stuff
Fix incorrect surfacetool example in class docs
Diffstat (limited to 'doc/classes/SurfaceTool.xml')
-rw-r--r--doc/classes/SurfaceTool.xml4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml
index 9d0962f337..43d34d3890 100644
--- a/doc/classes/SurfaceTool.xml
+++ b/doc/classes/SurfaceTool.xml
@@ -11,14 +11,14 @@
st.begin(Mesh.PRIMITIVE_TRIANGLES)
st.set_color(Color(1, 0, 0))
st.set_uv(Vector2(0, 0))
- st.set_vertex(Vector3(0, 0, 0))
+ st.add_vertex(Vector3(0, 0, 0))
[/gdscript]
[csharp]
var st = new SurfaceTool();
st.Begin(Mesh.PrimitiveType.Triangles);
st.SetColor(new Color(1, 0, 0));
st.SetUv(new Vector2(0, 0));
- st.SetVertex(new Vector3(0, 0, 0));
+ st.AddVertex(new Vector3(0, 0, 0));
[/csharp]
[/codeblocks]
The above [SurfaceTool] now contains one vertex of a triangle which has a UV coordinate and a specified [Color]. If another vertex were added without calling [method set_uv] or [method set_color], then the last values would be used.