3D Sidescroller, stop pawn from going "sideways"

Hello, i have a simple question, when i walk my player controlled pawn into an object near the corner, it goes like sideways to avoid it.
The floor is mesh of small hexagon pieces, to are the higher platforms to jump on.
Sadly i dont know how to explain it correctly so i hope people will understand what i talk about. I tried to lock the x Position for everything ( player, capsulecomponent, mesh etc etc) but it still trys to go around corners. I thought i found something simple i have to check in the config, but i just cant find it anymore.


Edit: Ok i just found another method, the planar movement. But wasnt there something else to check to avoid the player from going around objects?