Pick up a destination position based on direction + distance

Hi guys! What would be the best way to pick a destination (on a recast graph using RichAI) based on a start position and a search direction?

For example I need the agent to move 10 meters in a certain direction but I also want to make sure the final destination position is not going to land say on the other side of a wall that would force the agent to travel a distance much greater than 10m…

Take a look at the Wander AI tutorial you’ll have to filter the results by direction, but this could be a great start :slight_smile:

2 Likes

Thanks Toasty, I’ll do that! :slight_smile:

One thing of note is that the RandomPath has field called aim. If you set that field and a relatively high aimStrength then I think you will get a reasonable behavior.

2 Likes