How to check and turn a corner while wall hugging?

:thinking: I’ve encountered this problem now, I think what I might do instead is allow the player to move diagonally, but the problem is constraining the player’s diagonal movement correctly, like you reach a corner, and the game recognises you can move around it.

Directionally speaking, from the perspective of the character, he would always be able to move diagonally left-down and right-down . Since the animation would handle the rotation, would that also be used to make sure that the player would always turn diagonally correctly?

But I’m assuming programming wise I’d have to make a check left-down and right-down somehow to make sure I’m actually hitting the wall if I’m moving diagonally, else don’t move in that direction.