How to fix the camera settings so it doesn't show the default blue background?

I’m working on a simple shooting game, but when I move my hero up (using the W key) the default background is shown. I know this happens because I attached the camera to my hero, but is there a fix so that it won’t show the blue background when I move my hero?

  • Choose your camera in the scene hierarchy
  • Click on Background color selector
  • Select any color you want to be shown
  • If you want to only see image, use a bigger sprite or create a tiling system.

Hello @tmarga. I think what you’re looking for is clamping the camera to stay within the borders of the game. I could write you a code, but it is better if you can see how to do it yourself. This is a YouTube tutorial that explains how to achieve what you want. Link: Clamp Camera 2D - 2D Game Development With Unity - YouTube

Hope this helps :slight_smile: