How to make AI avoid obstacles?

Currently when AI is told to follow a path it takes literally the shortest route possible using navmesh which causes it to bum into corners of walls and objects all time.

It know the path and does not run straight into obstacles but it seems to consider itself as a single point in space instead of a capsule so it always tries to avoid the obstacle but ends up hitting the side of it.

like say when walking through a door instead of going the middle of it , it goes through as close to corner as possible.
In other words the AI isn’t aware that it is a big capsule and not a point or singularity

How do I fix this behaviour?

Did you try something like that:

 GetCharacterMovement()->SetUpdateNavAgentWithOwnersCollisions(true);
 GetCharacterMovement()->UpdateNavAgent(*GetCapsuleComponent());

@B.Barz why isn’t this documented more visibly? Another question, does all this work for a non-character pawn?