I wasn't sure where to go with this, so I guess I'll post here. Suppose I want a grid map at runtime to place things in game, how would I go about doing this? Do I have to code the sizes of blocks I want, and if the cursor or whatever is within range of the block, fix the object there? Or is there an easier way to do this? It's the only method I can think of at the moment.

Pardon me if this is easy, I've only used grid maps in Godot that already had things placed at runtime.

That could work, but it's not exactly placing meshes all the time, per say? Other times it would be sort of like selecting two points and having something stretch or have several of one object spanned from point A to B. Mostly meshes, tho. This will give me a good head start.

Yes, that was way I meant by coding the interaction yourself. You can use ray casts to get the collision point (in world space) then use world_to_map() to get the cell of that click. From there you could set the cell to a particular asset using set_cell_item(), or track multiple clicks if you want to draw a line of assets, or a selection area, etc. but you have to code it.

I'm sorry, the docs make no sense and rely on using a demo scene. Here, I found a video on grid maps that makes more sense. The grid map part starts almost halfway into the video, tho. I'll have to keep digging around for stuff on using the grid at runtime, however.

I crashed Godot with the large amount of models I need. (grumble, grumble...) Is there a limit to how many models a mesh library can have, or a limit on how big they are? There's a lot of them, but they are low poly.

In that video he uses "Create Trimesh Static Body" which makes no sense because those 3d shapes are just cubes. Godot should be able to run much faster if you just add the collision shape yourself then go to its shape property and generate a box shape. You can change the extents of that shape to match a cube or that elongated cube.

I basically used the video to make my own mesh library. instead of using a pre-made library. I still don't know why Godot crashed, tho. I am also wondering if, despite its differences, I should be using Godot 4 as I want to keep this game constantly updated and have new content added over time.

However, I don't know if 4x will crash as well. That was weird.

I'm mainly looking into making my own mesh library that won't crash Godot ATM.

I remember a Voxel Game demo in official asset library. thogh it didn't used grid map... it do look like minecraft (using "chunk" to generate blocks)

Maybe it would work? Do you have a link?

What I'm trying to accomplish here is a game sort of like Sims, or maybe The Infected? I want the player to be able to use the grid to make walls and such. It's not easy, and wanted to start with the very core mechanics. I also have to build the pre-made, basic world.

I use real models, though, not just blocks. Check out Synty Studios, it's where I get them.

    Also... all my models are completely sideways when I import them? I switched to 4.x for this project only, but even with 3.x I get this:

    How do I fix it so I can turn the meshes into a proper, not-so-sideways library? My floor comes on the grid standing up.

    Update: I got my first grid map working. It was just a test, but I'm not complaining. I'll keep fiddling around with stuff, and see what happens.

    blender is z-up godot is y-up. In your export settings there should be an option to export y-up.

    Wait, you mean in Godot there are settings for this, or Blender? I haven't used Blender in ages, this is the source files directly from the Synty Studios store.

    I can alternatively do this the very long way, and put each mesh in manually, and doing so makes them not sideways, which is useful but very strange. Additionally, it's time-consuming, but then I can set up a lib for each mesh type very easily, ie a lib for ground, one for buildings, interiors, exteriors, etc.

    In blender, but if you are using bought assets from who knows what app, then YMMV. 🤷‍♂️

    You can define the orientation for the gridmap itself, and also each asset in a grid cell.

    There are a bunch of hotkeys that control the gridmap. ASD rotate the item, ZXC set the axis of the grid, and QE moves the plane. I cannot find where these are documented anywhere, though. Also Gridmap extends Spatial, so you can move and rotate it just like any other 3D object, for example rotating the x by 90 degrees for the whole thing.

    It seems like I will have to do this the hard way, Godot doesn't like the demo scene.

    Oh well, at least now I can be picky about everything.