Weird y-Offset using ArrayMesh

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

Hi all,

I am currently writing a HexMap based on multiple Chunks.
I generate one Chunk by Script with the use of an ArrayMesh.

Generating one Chunk works fine so far. However I now wanted to generate multiple Chunks next to each other. This seemed fine in the first moment but on further inspection I noticed Gaps on the y Axis between the chunks.
On a border between two chunks, the right one and the bottom one are slightly lower than the upper or left one. This is the same for all chunks, like they are slightly rotated.

Now I checked everything multiple times:

  • There is no rotation applied to any of the Chunks or its parents.
  • All the vertices of the Mesh have their y Coordinate set to 0 (I even double checked this, by setting the VERTEX.y to 0 in the Shader.

Example here:

I added the blue lines to highlight chunk borders.
Sideview:

Code to generate one Chunk here:

This is just prototyping code. Code Quality is not too good, but I think it should be quite easy to understand.

I tested around a lot with different Chunk Sizes and so on, but it was always the same.

Does anyone know where this is coming from and/or what I can do to solve this?
Thanks for your help.

Kind regards
KingEldarion