This plugin adds a Maze3D node to your toolset. Utilizing a GridMap and MeshLibrary, this will create a [width]x[height] size maze, as well as an optional NavigationMesh3D.
This is also a tool script, which allows realtime viewing and editing of the resulting maze. Mazes are generated off a seed, and a given width, height, linearity, and seed will be identical.
- Install the plugin
- Add node to tree.
Lots of things to adjust and tune! The below describes what each parameter does by default.
The width of the maze, along the positive X axis.
The height of the maze, along the positive Z axis.
How much the maze tends to form straight hallways. 0 for lots of straightaway, 1 for few. It's a bit backwards in how it's named.
The random number start. A given seed, width, height, and linearity will give the same maze.
If checked, generates a NavigationMesh3D for the given maze, to allow for your characters to travel through the maze easily. Off by default, as it's a bit slower than the actual maze generation.
The Dead End, Hallway, Corner, Junction, and All Way integers all help map your MeshLibrary to maze specific tiles. Not all MeshLibraries have everything in the same order!
This is what the Maze3D node will pull for its models in building the maze. There should be at least 1 mesh for each maze cell type.
This is a Basis for rotating the entire mesh library. Some MeshLibraries imported sideways/wonky and this provides an easy way to fix.
Rotates all individual tiles by given amount in degrees. Locked to 90° intervals.
- 2D Tilemap Mazes
- Multi-level mazes
- Easier editing of generated mazes.
Example Textures for maze were provided by Jestan