Pathfinding with curve

how to use pathfinding with a curved

path?

as you can see in the image green line is the path created with UE4 pathfinding. my question is there is any way to pathfinding like as Red line in the image?

my main problem is MoveTo() doesn’t care about Collusion of pawn and it chose the path of the nearest way to obstacles in the scene then for sure pawn can be stuck in the obstacles.

You can add a “Supported Agent” in “Project Settings/Engine/Navigation System” of the size of your pawn (Fill Nav Agent Radius and Nav Agent Height).

Are you using a CharacterMovementComponent in your pawn/character? If yes, you then can set the same values in the component under Nav Movement or have “Update Nav Agent with Owners Collision” checked (it is checked by default).

Your character should now choose a more appropiate path further away from the obstacle!


I am not an expert in this, though, this is just how it worked for me when I needed it!

thanks for your fast reply, it seems more like it create an extra collection around objects in the scene. I wish there was something for pawn collision size.
note :
for the who try this for the first time. after change values in the project setting probably you don’t see the effect or your AI stop pathfinding, for solve this you must delete RecastNavMesh from Outliner then go to Build / Build path. it will create new RecastNavMesh with your values.