Taking advantage of MeshLibrary
When you clicked FloorGridMap to investigate its properties, the Godot interface changed slightly, and it informed you that you should assign a MeshLibrary since, without one, a GridMap is ineffective. In this section, we’ll show you what goes into creating a MeshLibrary. We’ll also talk about possible challenges you might face, not technically, but workflow-wise.
There are two ways to create a MeshLibrary. We’ll show you the most common way since the other method involves keeping meshes separately in the filesystem, and our project has not been set up to accommodate that scenario. Without further ado, this is how you create a mesh library:
- Start a new scene and save it as
Floor-MeshLibrary.tscn
inMiscellaneous
. - Choose a Spatial node as its root.
- Instance Floor_Standard under the Spatial node in the Scene panel.
- Click the Scene button in Godot’s top menu.
- Expand Convert To and choose MeshLibrary...