Camera Panning Up, Down, Left and Right

You could probably re-purpose part of this template: UE4 Template - RTS Style Camera Movement With Edge Scrolling

There’s also an older post that explains his process, if you’d rather make it yourself.