How to switch/set pawn's navigation agent

I really need to find a way to switch navigation agent to a specific actor in runtime.
I have 3 agent with diffrent max step height, one for path walking, jump path finding and flying path finding.
Each systems are working perfectly exactly how I want it, so I wont change their approachs.

I just need to know how to set the ai character’s agent.
Even in pre runtime could help me.

Didnt find any document or any setting about it, only about changing the world level agent not more then that.

1 Like

Same question here, it’s very hard to find this fundamental information, Epic Games really needs to step up their tutorials and training they’ve got the money to do it

1 Like

Old topic but relevant so imma do some gravedigging.

If you are blueprint only, the best solution I’ve found is just forgetting the pawn.
Get and store (so you don’t have to do GetAllActors half the time) the recast navmeshes and you can search their object name for the agent name you are using. And you can just plug that into the FindPath nodes. as it takes pawn OR recast navmesh.

If you are doing c++ you have no such problems, you can just use the agents directly anyways. Navigation raycast does take only controllers though so if you want to use that… well, I needed it but the controller always resulted in null navdata so it defaulted to the default agent. Had to change the thing a little.
The code for the agent selection is just copy pasted from the FindPathTo… functions and works fine but I did have to learn stuff like “yea, if you are using things from NavigationSystems then maybe, just maybe, include it in your build.cs, pretty please?”. I did feel particularly st*pid at that point.