I have prefab with Seeker script attached to it. Whenever that prefab instantiated seeker.StartPath is called in its Start method. The problem is that each object gets the same path.
My question is:
How to make that each object would get random path from the possible pathes
How to make Pathfinder to find not the shortest but any possible path
I have done some basic path seeking myself by implementing the A* algorithm. To get a random path, you will need to make modifications to the heuristic function by introducing new rules in selecting the best/next node, by controlling these rules using a random number, you will get random path.
You are using A* Pathfinding from arongranberg.com, aren't you? If source codes are included and there are a detailed documentations, you can make modifications to the source code by referring to the comments in the source-code with the documentation.
can anyone help me?
– theateistYou may ask directly in [A* Pathfinding project forums][1]. [1]: http://www.arongranberg.com/vanillaforums/
– frareesI have done some basic path seeking myself by implementing the A* algorithm. To get a random path, you will need to make modifications to the heuristic function by introducing new rules in selecting the best/next node, by controlling these rules using a random number, you will get random path.
– Chronos-L@Chronos, do you know where to change the heuristic function in pathfinder in unity?
– theateistYou are using A* Pathfinding from arongranberg.com, aren't you? If source codes are included and there are a detailed documentations, you can make modifications to the source code by referring to the comments in the source-code with the documentation.
– Chronos-L