Hi everyone,
I’m trying to create a function that can take an ArrayMesh, add it into dictionaries for storage, and then later generate a “global” ArrayMesh by combining the meshes stored in those dictionaries.
The problem is that the normals of the resulting global ArrayMesh behave strangely:
-Only the regions with negative coordinates are lit correctly, while everything else appears dark.
-In some areas, one end of an object is lit differently compared to the opposite end of a neighboring object.
Does anyone know what could cause this issue or how to fix it?
Thanks in advance!
for (int i = 0; i < vertices.Length; i++)
{
vertexDict.Add(idVertex, transform * vertices[i]);
normalsDict.Add(idVertex, transform * normals[i]);
uvsDict.Add(idVertex, uvs[i]);
idVertex++;
}
array[(int)Mesh.ArrayType.Normal] = normalsDict.Values.ToArray();
Godot Version
4.3
Question
Why are the normals of my global ArrayMesh behaving incorrectly after combining multiple ArrayMesh objects