Download

Increasing the distance from obstacle (navMesh)

Hey, When I use MoveToLocation the function tells the character to reach the targert while avoiding any obstacles on the way. I have wondered, how can I increase the distance of the character’s path from the obstacle?
For an example here is the original path:
DxslIAO.png

and here is what I wish the path to be:
Db2e7Hr.png

The problem is that I want only a specific character to increase the distance from obstacle, which means that I can not do any global change like changing the navmesh, I can only change the character itself.
I have tried in the code to increase the agent radius (and height) but it didn’t seemed to do anything:
GetMovementComponent()->NavAgentProps.AgentRadius

Navmesh are a bit tricky, you need to change the properties inside project settings -> Navmesh. I managed to do what you wanted by changing the AgentRadius but not from the navmesh inside the world but in the defaults settings.

Hey, please read again this lines:

Have you tried to increase the character’s capsule radius?

I think I mentioned in another thread you started that one navmesh can handle only one agent size. If you want to support larger agents, they need a separate navmesh, but if it can be set only in project settings as mentioned above, then it is not possible currently with UE4, and you have to use Rama’s sample project supporting easy usage of navmesh path filtering by using navmesh modifier volumes: [Complete Sample Project] AI Navigation ~ Create Custom Pathing Using Nav Modifiers + Query Filters - Community Content, Tools and Tutorials - Unreal Engine Forums