mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
committed by
Yuri Sizov
parent
8db6947643
commit
cede79e089
@@ -26,17 +26,14 @@ Here's a sample on how to generate a triangular face:
|
|||||||
|
|
||||||
.. tabs::
|
.. tabs::
|
||||||
|
|
||||||
var mesh = ImmediateMesh.new()
|
.. code-tab:: gdscript
|
||||||
|
|
||||||
mesh.surface_begin(Mesh.PRIMITIVE_TRIANGLES)
|
var mesh = ImmediateMesh.new()
|
||||||
|
mesh.surface_begin(Mesh.PRIMITIVE_TRIANGLES)
|
||||||
mesh.surface_add_vertex(Vector3.LEFT)
|
mesh.surface_add_vertex(Vector3.LEFT)
|
||||||
|
mesh.surface_add_vertex(Vector3.FORWARD)
|
||||||
mesh.surface_add_vertex(Vector3.FORWARD)
|
mesh.surface_add_vertex(Vector3.ZERO)
|
||||||
|
mesh.surface_end()
|
||||||
mesh.surface_add_vertex(Vector3.ZERO)
|
|
||||||
|
|
||||||
mesh.surface_end()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user