Hello how would i keep the pawn inside the camera view (block all sides of screen) whilst allowing the pawn to freely move around?

An example would be arcade shooters where the ship cant go out the sides nor top or bottom of the screen whilst the camera is moving.

Thanks.