move the camera only when the character almost reach the border of the screen

Hi everybody, I’m making a 2.5d game, and I want to move the camera only when the character almost reach the border of the screen, like the mario games. I’ve no idea of how to do that.

Thanks.

Hello!

ProjectWorldToScreen is the node for you! It returns the screen position in coordinates of an actor.

You need to get player controller and plug in player to get the camera.
Get player Pawn==>get actor location and plug in world position.