Why does triangles.Length of a mesh give 4?

Godot Version

for (int bs = 0; bs < baseMesh.GetSurfaceCount(); bs++)
base_surfaceArrays[bs] = baseMesh.SurfaceGetArrays(bs);
Godot.Collections.Array base_surfaceData = base_surfaceArrays[bs];
Vector3 baseVerts = (Vector3)base_surfaceData[0];
int base_triangles = (int)base_surfaceData[1];


Am new to Godot and I thought that [0] were vertices and [1] were triangles, but am getting always multiples of 4 after some debugging, which makes me think this is incorrect (source chatGPT), being really quads. IS THIS ASSUMPTION RIGHT?


1 Like

If anyone else is having this issue, I solved it by putting [12] instead of [1]