How to make mario-like 2D camera?

Hello! I’m starting with UE4. I’m trying to create mario-like camera using 2D sidescroller template in UE4. Now I have camera fixed to player position, so when player moves, or jump, camera does it too. What I’m trying to achieve is what was done in Mario 2D games. Camera is in place when player moves mainly in center of the screen, it only moves when player is going to the edge of the screen in each direction (left, right, or up). How can I achieve something like this based on stock 2D sidescroller camera blueprint template in UE4?