The question is answered, right answer was accepted
AI that doesn't use NavMesh and is similar to PacMan
I'm making a puzzle game so radius makes it really hard to control the AI I want to control the AI in like blocks so it can move 10 blocks squared or so rather then having a radius any tips on making it please help :'(
Answer by julian_at_pf · May 23, 2018 at 07:07 AM
Google is your friend:
https://gigi.nullneuron.net/gigilabs/a-pathfinding-example-in-c/
Thanks xD I guess I'm noob at googling anyway I was searching answer from here when I should have been using google lol.
Yeah no worries. It's annoying you have to write your own A* to do this, but it's a small (fun) job that gives you a good grounding in what Unity does under the hood.
Alright I made everything but there's an error with the map how to make a map in unity
Two levels required. First is the game level.
byte[,] _map = new byte [10, 10];
A map cell is 0 if you can occupy it, and non-zero for cells you can't move into. It's relatively straightforward to create a cell editor in Unity where you can create maps like this.
Second is the path-planning level, where you turn the map into a graph
var graph = createGraph(_map);
Each node in the graph is a cell that you can occupy. Each edge in the graph represents a move to a neighbouring cell. If you can't move because the cell is blocked - no edge (or alternatively, if you want to temporarily block an edge, each edge should have a traversal cost, and you can make that cost Int32.$$anonymous$$axValue or float.PositiveInfinity.
Follow this Question
Related Questions
I don't understand how to use Car AI in Standard Assets. 1 Answer
RAIN AI - Enemy shoot player 0 Answers
Creating Chess AI 0 Answers
Unity Networking, where do I start? 0 Answers
Looking for a specific page in documentation for Unity3D 0 Answers