vertices Arrays To Mesh c#

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Vikrant

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

:bust_in_silhouette: Reply From: magicalogic

This is how you create a mesh from an array of points in gdscript, maybe you can translate it to c#.

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

Vikrant | 2021-05-11 11:50

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

magicalogic | 2021-05-11 13:17