Facepunch / sbox-issues

176 stars 12 forks source link

Better Default Navmesh Generation Parameters #1999

Closed gvarados1 closed 1 year ago

gvarados1 commented 2 years ago

For?

Hammer

What can't you do?

The current default navmesh generation parameters do not include jump up/down (aka climb/drop) connections. Most maps will use this so most maps will have sub-optimal nav.

image

By default, Agent 0 uses the Half-Life: Alyx Combine Soldier nav settings. There are no climb/drop) connections so this limits npcs on any map without a custom nav. The new NavPathBuilder lets us specify maximum climb/drop heights, so this will not affect npcs that can not climb/drop.

How would you like it to work?

The default Max Jump Down/Up Dist for Agent 0 should be set to a large number. I think 1024 sounds reasonable but the input box currently only goes up to 1000: image

Again, there is no downside to this because you limit how far an npc will climb/drop in the code. If you only want your npc to jump 64 units, you'd tell that to NavPathBuilder.

What have you tried?

Currently any game that wants to support npcs jumping needs to have all their maps use a custom navmesh. This includes NPC zombie horde and also games like Conquest on Metro. Bots/NPCs can't path up/down little ledges like this without custom nav parameters: image

Additional context

Also any time we load a map with custom nav parameters we get this little warning in the top of the screen. It doesn't mean anything and can be removed image

yuberee commented 2 years ago

The "Navigation mesh was generated with non-default agent settings." is clearly a leftover from Half Life: Alyx, I thought it only showed up in Tools Mode but I've had it show up in Release Mode as well. I'm sure it's a line away from being removed.

bakscratch commented 2 years ago

Addressed these 2 issues, feel free to close if its ok

gvarados1 commented 1 year ago

Thank you bakky ❤❤❤❤