How to create a meshlibrary for a gridmap properly?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Gokudomatic2
:warning: Old Version Published before Godot 3 was released.

Hello

After a couple of week spending creating a mesh library for a gridmap, I finally today got to the step to import it in godot. However it reacts strangely because the meshes of the tiles are not properly aligned.

My scene with all tiles were made in blender and imported in godot with dea. The structure is like this:

  root
       empty.001
            MeshInstance.001.1
       empty.002
            MeshInstance.002.1
            MeshInstance.002.2
       empty.003
            MeshInstance.003.1
            ...

It is not exactly like the mesh library of the platformer demo, since I added an empty between the mesh and the root. And I had to do this because some tiles are made of multiple meshes. Also, I use the empty to align the mesh easily.

Therefore I’m wondering, what is The good way to create a mesh library?

No many people seem to work with gridmaps.
Well, I had to fall back to the solution of merging all my meshes in one mesh per tile and set the origin to the center of the tile (which was the location of the empty). Quite restrictive but it works.

Gokudomatic2 | 2016-06-16 11:46

:bust_in_silhouette: Reply From: vctr

Here is a good tutorial for this
http://docs.godotengine.org/en/stable/tutorials/3d/using_gridmaps.html