In my project settings I changed things in the nav settings like cell size and agent radius. When I create a new navboundsvolume and look at the recast in the editor, things like the cell size are correct (what I have in the project settings) but the agent radius always defaults to 35, despite the project setting being 0. I can change it in the editor to 0 and then the nav mesh looks correct. But at runtime it resets to 35. I can eject and reset it in the game to 0 and then it updates and NPCs move freely in the new updated area but closing out the game and restarting it defaults it all back to 35. And you can’t apparently edit this at runtime.
Is this a bug or am I missing something?
I do have generation to dynamic in the settings as well, also force rebuild on load is true as well.
Not sure if it applies here, but for most settings in UE, 0 is used when you want to use the default value. This may be why it resets to 35. Try 0.0001 or something if you really want actual zero.
Yeah, I tried setting it to alot of stuff non-zero but the agent size always resets to 35. I found posts from 2017, 2022, 2024 with the same issue and it didn’t look like it was every resolved. Pretty disappointing. I mean it works great when during runtime I go in and change the setting but it never sticks or carries into the game.
I’m still convinced it’s because you’re using 0. In UE, 0 means to use the default.
Here are a few things to keep in mind.
- Bound Volumes have checkboxes for the agents to support. EASY.
- Nav Meshes don’t have checkboxes. So how do they select the agent? By their agent properties. They find the closest match to an agent in your project settings. So properties in the navmesh must match exactly. I think using 0 will not work the way you think.
- How do characters select their agent? Via their agent properties in their controller. You can override this in your custom controller class. The movement component also has settings, but I think this just overrides stuff.
- The internal logic in how to handle 1 agent vs. multiple agents is COMPLETLY different.
If you change an agent setting in your project settings, make sure you also change it in the nav mesh.
For matching NavAgents, it uses all the properties in FNavAgentProperties. So AgentRadius, AgentHeight, AgentStepHeight, NavWalkingSearchHeightScale and PreferredNavData (the nav mesh).
So make sure all these match between the NavMesh and the project settings. If you only have one agent, then it skips all of this. It just uses the only agent you have.
Are you using 1 agent or multiple? If you have only 1 agent and it’s resetting to 35, it’s because of the 0.