Hi there, i have a problem figuring out what the issue might be:
i have a mesh here wich is generated like this:
// Create a new mesh for the area.
const siteMesh = MeshBuilder.CreatePolygon(
`temp_siteMesh${siteData.id}`,
{
shape: boundary.map((position) => {
console.log(position)
return new Vector3(position[0], position[1], position[2])
}), // y-Value is ignored anyways
holes: holes.map((hole) =>
hole.map((position) => new Vector3(position[0], position[1], position[2]))
),
wrap: true,
},
scene,
earcut
)
console.log('SITES MESH total vertices', siteMesh.getTotalVertices())
// siteMesh.setVerticesBuffer(colorBuffer)
siteMesh.increaseVertices(20)
coloring is done entirely by vertexcolor, not a material.
the result is for example this:
now sometimes when i change the vertices (for example by adding a handle to the outline) the vertexcolors seem to be broken.
so my question to the more experienced: how does that error look like? are the vertexcolors broken? or is the mesh broken? where would i start to look for the problem?
i did expect the increaseVertices to make the problems, but also without it it sometimes shows this problem.
Any idea where to start looking for the issue?
Thanks a lot!