Make NavigationAgent3D move around Static3D bodies?

Godot Version

4.2.1

Question

In my game the player can place conveyor modules (Static3D bodies) and I want my capsule to move to a destination and move around the conveyors.

What do I have to do to make sure that the conveyors are recognised as proper obstacles so the agent can calculate a proper route around them?

Wait, is it seriously as simple as adding the conveyor as child to the NavigationRegion3D and calling $NavigationRegion3D.bake_navigation_mesh(true) ?!

You (re)bake the navigation mesh on the navigation region with your new objects as part of the parsed objects. So either you have them as a child of the NavigationRegion3D if you use default settings or you give them a group and switch to parsing by group names.

1 Like

how would I do that?

image
select a node and switch to Node tab

I meant how do I parse by group names to update the navigation mesh :smile:

here

1 Like

Awesome, thanks! :slight_smile: