Nerd For Tech
Published in

Nerd For Tech

Mobile Games In Unity: Perspective vs Orthographic Camera: Parallax

In this article I want to go over a really cool way to bring this level to life using parallax. Right now when I move my camera on the X axis, the level moves, sure, but theres no depth. Its all moving by at the same time, but we obviously have different layers.

First I want to set my camera form an Orthographic projection to a Perspective projection.

Now the camera is zoomed in nice and close. This will be a good perspective for a mobile game since our focus will be on the player.

Now all I need to do is select each layer in the hierarchy and set their Z positions. The foreground layer will be 0, the background will be 1, and the far ground will be 3. Now when I move I get a really nice feeling of a parallax environment with plenty of depth for more realism.

In the next articles I’ll be covering how to set up the player and start building this game!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store