Voxel game navigation

Godot Version

4.4 stable

Question

Hello! I have start to create game, like Minecraft clone, in Godot. I have create simple game in Godot 4.3 and voxel GridMap, but have terrible performace(which is expected with all billions of blocks displayed) and the inability to create mobs with pathfinding. Now, in Godot 4.4 I have start new project and generate using SurfaceTool mesh of chunk and create trimesh collision. When I have add mob he cant step off flat surface of block(I generated Navigation mesh only from top face) Cant jump up and jump down. Is this Godot completely unsuitable for this type of game? Or I am stupid🤔

There are several godot voxel plugins. I’d recommend checking them out

How vertical is your game? Are you planning on allowing minecraft-style arbitrary terrain modification?

If your terrain is relatively static, you could make a separate 2d navigation grid where the traversal cost between voxels is (say) one plus the height difference, and you could paint high costs on anything impassable. This scheme becomes increasingly difficult if the game allows rooms-over-rooms, but for a game that’s mostly planar with a heightmap, it will do just fine.

I tried Zylann Godot Voxel Tools, but it gives little control over voxels, and since my project is mostly educational, I use the standard Godot tools.

Like Minecraft clone in Godot, I have 1x1x1 procedular block, Mesh generated use SurfaceTool, after this create trimesh collision. I have problem with mob pathfinding(ChacterBody3D + NavigationAgent3D), what can do down or jump up.

i think you need to create your own voxel-based navigationsystem

My project is mostly educational, I am not so good in Godot to write own navigation system/

What exactly do you want to achieve? Since its just a educational project maybe its enough to implement a simplified pathfinding system

Simple(maybe not optimization) path finding system in engine. look like Godot development want to add better navigation agent and regions but we will have to wait years

this just sounds like the navmesh area the enemy is standing on has no way to connect to the rest of the navmesh. or a collision problem.

what do you mean jump up and down?

I have voxel game(like minecraft) and mob can`t jump from one flat plane to another. I think he can go in vertical side(I have add all faces expect the bottom) but generated path look bad and finished i at point far from the player

the only thing that can be done is set the I think it’s called step size. but this is a navmesh, movement will be both up and down.
you can’t expect a navmesh to do jumping up and down, that needs extra code, it is not within the capabilities of a navmesh. this is also true in other engines like unity, where they added a “jump” node to connect between different areas of a navmesh.