Godot Version
4
This might be a simple one… I’m reading through the ArrayMesh tutorial https://docs.godotengine.org/en/stable/tutorials/3d/procedural_geometry/arraymesh.html
and am wondering how GDScript knows what index is being referred to here:
surface_array[Mesh.ARRAY_VERTEX] = verts
surface_array[Mesh.ARRAY_TEX_UV] = uvs
surface_array[Mesh.ARRAY_NORMAL] = normals
surface_array[Mesh.ARRAY_INDEX] = indices
# No blendshapes, lods, or compression used.
mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, surface_array)
How does it know Mesh.XXX_XXXXX corresponds to an array element? I see in the C# portion these are converted to (int) which makes sense to me because array indices are ints. (I am brand new to Godot feel free to refer me to another topic)