How to make the NavMeshBoundsVolume dynamic?

Hi guys, i wonder if there is a way to make the NavMeshBoundsVolume dynamic?

Main problem: i have created a mini elevator goes up and down, but it seems like the NavMeshBoundsVolume could’t cover the space where the elevator runs.

I have set a NPC standing on an upper floor, and when the mini elevator reaches the floor, it will change the guy’s destination into some location inside the elevator. For the guy, it has a “move to” function to make him run for a specific destination, which will be called when the elevator reaches the floor.

When the elevator reaches the floor, it successfuly changed the guy’s destination and call the “move to” function, but the guy’s just didn’t move at all!

I wonder if it is because the NavMeshBoundsVolume isn’t dynamic, so that the detination for the NPC is un-navitable?

OR Is there a way to solve my problem?

Let me know if you dont get my question!
Any help would be great!

Wishes!

Hey ,

Great question! Yes, you can make it dynamic. There’s a setting in Project Settings under Navigation Mesh to make mesh generation dynamic which will allow you to use moving meshes as part of navigation.

I also highly recommend you read through this document about customizing navigation in general. There are several great examples here detailing how to customize your navigation system to make AI flow smoothly through a level.

Please let me know if this helps!

2 Likes

Thanks bro, It worked, Help a lot.
And i’m checking on the tutorial you recommended !

Hi, I changed the static into dynamic and it did allow the Navigation system to be built at run time.

But there is just another problem, that when i switched to dynamic, the NPC just moved weirdly and differently everytime.

I don’t see the problem in the tutorial, could you please help me a bit with this ?

Appreciate.

Hey joeychenj,

Can you elaborate a little bit on what you mean by moving weirdly and differently every time? Also, how big is your nav mesh? AI can behave strangely while the navmesh is being generated; this is something that usually happens during a loading screen in games that use dynamic mesh.

More than happy to help!

Hi SkyCarCaesar,

Firstly. sorry about my unclear expression. Let me explain that in detail and graphs:

1. in static mode
i made the NPC move to the sphere target, and the NPC ran directly to it as the red line:
static

that was what i hoped.

2. in dynamic mode
the NPC has the same target, however this time he kept changing the direction as the red line:
dynamic

When i showed the Navigation in game, i found that the area in front of the NPC was always red. which i guess meaning un-navigable.
Sorry that i don’t have my laptop which has this project right now, i can’t show you what happen in the game.

Secondly, i created a similar case on the desktop in my office, that problem didn’t happen this time. lol

i guess it was probably be caused by omputer’s performance difference ? (because it is running dynamicly)

Thanks for your help. If this doesn’t make any sense to you, it’s no big problem, i’ll just switch to my desktop.

Wishes