Define no-go regions within a NavigationRegion3D

Godot Version

4.2.1

Question

Hi, I’m trying to make the enemy follow the player. The thing is, I have some stairs in my game and I want the enemy to go “the long way” and not cut corners. I’ve tried to add some NavigationObsttacle3D in my NavigationRegion3D but the agent is still cutting corners and going inside the NavigationObstacle3D area. How can I achieve something like a no-go zone inside my NavigationRegion3D?

This screenshot shows what happens

And in this screenshot is what I would like to happen:

The enemy walks from behind the stairs and the player is on top of the stairs just so that you understand the context.
Thank you so much for helping!

Best regards,
Ben

You dont need to use your visual mesh geometry for navmesh baking (alone). Just add some e.g. collision shapes or other objects for the baking to build the layout that you want. You can move them to a different layer just for the baking or hide them so they do not affect anything else.

I don’t know… This sounds more like a workaround and not like a solution to me. I’ve decided to implement it this way, but I’m not quite 100% happy with it.

It says that you have to create the NewNavigationMesh3D in the Inspector. Then on the top window. Click BakeNavigationMesh. To prevent your player from stepping over sharp edges. It says you have to change the max climb to something less than your step height. But, you also have to change the cell size to match the max climb to prevent broken bakedmeshes. But, here’s the thing. This is for slopes. I don’t see how this works for steps using navigation meshed 3d. Because this would just prevent your agent from stepping on the steps. Every single step. Since the height is always going to be less than max climb. The only way I see to do what you ordered is to have small borders on the sides of your stair mesh. That way the front will have the max climb that will alow you to set the agent climb. And, the high border will not. I have’t actually gotten a chance to get the ray cast tutorial done.