The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates.

godotengine.org | Twitter

0 votes

I am trying to create different sets of MeshLibraries for my GridMap, utilizing the same script and collision. FOr example walls and floors for jungle,desert,dungeon and so on. After finalizing script for random terrain generation I discovered, that there is now way I can control what index is going to be assigned to each mesh after importing scene to Mesh Library. I tried alphabetical order, child order, adding piece by piece - everytime Gridmap does some horseshit and enumeration is like random. Even when items are aligned in correct order in Editors UI - they still get indexes like 0,3,4,1.... This is bad for me, because I expected script to recognize walls and floors by the index, and now it seems impossible. Every new mesh library I create using the same amount of different meshes gets different indexes for each of them.

Did anyone find a way around this ? Or am I doing something wrong with converting ?

Godot version godot 3.2 stable
in Engine by (8,188 points)

1 Answer

0 votes

I found it out finally, GridMap in Godot3 is really bad compared to TIleMap...

It occurs, that when You create MeshLibrary based on saved scene, formerly inherited from glb file - the order of items and their indexes depend on child order of the scene. However if You create Mesh Library using unsaved inherited scene or glb file itself - only then order of items depend on their order in Blender, no matter how You changed it in the Godot Editor !!!

This was terribly irritating to track down, I have now like 30 test mesh libraries in my project. Other bugs of gridmap were omnipresent : contents of overwritten meshlibrary is never erased, You have to create brand new one. Item preview in editor is often swapped for the item You already deleted. This node is a nightmare. I hope it is fixed in Godot4

by (8,188 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.