Have AI take only valid paths with a nav mesh

Hi! So I have a base with a large radius around it and a collision sphere that checks if the player is in it. The player can place relays that have smaller spheres and if they are in a relay that is connected either to the base’s sphere or to another relay that is part of a chain of relays. How can I have the bot make sure that it only takes paths that are in the spheres?

The first pic here shows how the larger sphere is the main base and the medium-sized sphere is a relay that extends the range that the bot can travel. However, the bot can only travel inside of the spheres. I’m using a navmesh and I’m wondering how I could get it to follow the relay path to the green square, resource. The additional thing here is that the relays are placed by the player, so I can’t manually place a nav mesh modifier. So if I’d end up using one, I’m not sure how to set one up dynamically. Thanks for the help!


These might have some useful information:

2 Likes

That’s perfect! Thank you so much!

1 Like