D
D
durnevdanya2017-04-26 21:06:31
3D
durnevdanya, 2017-04-26 21:06:31

How to create such mazes for Unity?

Hello. I want to create mazes like this
StartnFinish.jpg
so that I can walk the character myself using WASD, and also have walls like the yellow ones in this picture. How can I do that? Put up every wall yourself? Or can you just make cutouts in the model yourself?
Thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Daniil Basmanov, 2017-04-27
@durnevdanya

The task consists of two parts: maze graph generation and graph visualization. You can read about generation algorithms on Wikipedia , there are a lot of them, they all give different results, it is very likely that you will have to come up with your own in order to get the desired maze connectivity. You can see an example of generation in my toolkit . When the graph is generated, it can be visualized in any way, it all depends on your imagination, the easiest way to do this is by instantiating prefabs. Just go around the entire graph and create walls in the right places. You can see code examples here and here .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question