Tutorial for creating Mesh (SurfaceTool)

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Rihard
:warning: Old Version Published before Godot 3 was released.

I’m trying to create some script to generate 3D object.
But in documentation nothing, about this. (especially about SurfaceTool)

:bust_in_silhouette: Reply From: DriNeo

I’m not aware about tutorials but I found this plugin code by “TheHX” as an example.

https://github.com/TheHX/add_primitives

It’s probably “overkill” for beginners, but I hope it will help you a bit . Sorry for my english.

:bust_in_silhouette: Reply From: Rihard

I found some tutorial, what also have example with creating polygon:
click

But… what do .add_uv(Vector2)?

add_uv() sets texture coordinates for the next vertex. “next”, because SurfaceTool requires you to add vertex attributes before you call add_vertex().

Zylann | 2016-07-22 12:48