Help with camera!

So I am new to unity and I am attempting to make a 2d game. I am having problems with the camera not picking up my project.

This is what it should show.

This is what it shows now.

Set the camera’s z position to -10.

The camera is not rendering the sprites as they are on-top of them. It’s like taking a step back in order to get a good view.

2D views use X and Y for left-right, up-down.

Z is for depth. Negative Z values = towards you, into the screen.

So a Z value of -10 drags the camera back towards you, so it can look into the scene, where your 2D objects sit at zero on the Z axis.

Unity is inherently a 3D space. So when you want to “zoom”, you can change the distance of the camera from your plane of action, by changing the Z position of the camera.

Similarly, you can instantly get a 2.5D view by moving the camera’s target to an X,Y position that’s not quite the same as the camera itself. This gives perspective to your 2D objects on their XY plane.

1 Like

You may not need 1000 depth on your far clipping plane since your camera most likely will be close. I use 20-50 far and 0.1 near. In 2D mode, it’s easy to get too close to the action lol

The good news if you are lost, click out 2D mode in your Scene, click on one of your active tiles in the hierarchy and then press F for focus. Your map should pop up. (If that was an issue for you.)

1 Like

Their camera is orthographic. Changing its position on the Z axis won’t give a zoom effect. To achieve zoom, you change orthographic size. Orthographic size is equal to half the size of the camera’s vertical frustum. So the more orthographic size, the more you can see and less zoom.

You missed the word “can”.

I did? I’m not sure I understand?

Edit: I got you. But you can’t with an orthographic camera, nothing will happen. You can change the z all you want, the only thing that will happen is objects outside of clip space will no longer render.