Random Path between two points

Hi,

I searched the forums but could not really find a solution. I have a 2d grid where a player should be able to walk left/right or up/down. The start and end point is given. What I would like to get is a random path between the two. This should be a different one each time, not always the shortest, can also be the longest sometimes.

Is this already possible? How would I setup a system like this?

Cheers, Robert

Hey,

Take a look at the wander AI tutorial
This should get you going in the right direction

Hi

One option could be to use an ITraversalProvider (see https://arongranberg.com/astar/docs/itraversalprovider.html) to add a random penalty to every node your agent traverses. This way it will take different paths every time.

1 Like