0 votes

Hi, I want to generate game levels procedurally, i know how to this, so i translated unity c# code to godot c# code, Every thing worked fine...but generating mesh is quite complicated in godot i tried to generate mesh but instead of getting level (similar what i gott in unity) i got nothing. I followed Codat's tutorial.
so my question is how to convert vertices and triangles array to mesh

Godot version 3.3
in Engine by (188 points)

1 Answer

0 votes

This is how you create a mesh from an array of points in gdscript, maybe you can translate it to c#. https://docs.godotengine.org/en/stable/classes/class_arraymesh.html

by (1,055 points)

Seems to work but getting graphical glitches probably due to normals....
any idea how to calculate normals

Vector cross product operation can give a normal to two vectors, but i have no idea how to implement that.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.