Jump to content
  • Advertisement
G-Dot

Unreal How to change AI Navigation in game

Recommended Posts

Hello everyone! I've implemented some simple mechanics in my game, but faced not so simple problem. Is there are any ways to change AI navigation with events in the game (for example when you hit a switch). The problem can be clearly seen on the bridge example on the screenshots below. When bridge disappear enemies still trying to use the navigation which leads to their fall. I've made bridge disappearing by switching the material and setting no collision on it. I've placed bridge in the editor activated and it generated navigation. But how to get rid of it and change it, for example, with nav link I don't know. And also how to turn navigation back when the bridge is active?

 

Here we got bridge and we got navigation for it.

image_171117.thumb.png.103edc3d67a479a3c08661b73a301c6f.pngimage_171118.thumb.png.dfba2f3035a76be2afddecb814de116b.png

 

 

Here we don't got bridge, but still have navigation for it.

1103057767_image_171116(1).thumb.png.50c4a8294477fd2ebeb3348b8beb7c42.pngimage_171119.thumb.png.9e67926e5ed0d4b9abca0951c7da48d4.png

 

Share this post


Link to post
Share on other sites
Advertisement

Thanks, I've checked it and it works fine. But now I've got another question. The point is that I got pretty big map and it's got only one navigation volume. So is it ok to use runtime navmesh generation with one big navmesh volume or I should better divide it into smaller chunks?

Share this post


Link to post
Share on other sites

chunks.  Have stationary pathfinding volume for areas that don't change, and only update the navmesh volumes that are affected by the object for a really high-performance increase.

Share this post


Link to post
Share on other sites

Alternatives are influence maps:
https://forum.unity.com/threads/ai-influence-maps.145368/
http://gameschoolgems.blogspot.com/2009/12/influence-maps-i.html

Influence maps with pathfinders:
https://www.hindawi.com/journals/ijcgt/2018/5184605/
https://www.cs.rutgers.edu/~mk1353/projects-constraint-aware-navigation.html

Two search graphs one of low level and one of highlevel.

On 8/22/2019 at 8:40 AM, G-Dot said:

Thanks, I've checked it and it works fine. But now I've got another question. The point is that I got pretty big map and it's got only one navigation volume. So is it ok to use runtime navmesh generation with one big navmesh volume or I should better divide it into smaller chunks?

You could also, divide the navmesh per game region and only operate among a certain subset of the navmesh if connectivity in ensured.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!