Unity Mobile Game — Scene Setup

Create some Perspective Parallax and Setup our Player in Unity

Objective: Go over how I achieved perspective parallax and how I set up my player for my 2D mobile game in Unity.

Perspective Parallax

In order to achieve perspective parallax, the first thing you need to do is make sure you have a scene with varying layers to them. For example, in my project, I have three (3) different layers — foreground, background, and far_background.

Now, to achieve the perspective parallax, it will help if you have your layers Z-Transform component at different values. For example, on my background layer, the z for my Transform is set to 1, and the z for the Transform on my far_background is set to 3. With all that, make sure your camera has its Projection set to Perspective. This will give you a result similar to what I have shown here:

Player Setup

To get the player setup, the first thing I did was slice all of the sprites necessary to create the animations for our player.

Once I got that done, I pulled in the first frame of my player idle sprite and made it a child of an empty GameObject named Player

With this, I now have a player in my environment I can do manipulate and do cool things with.

With that, we have our scene set up as we move forward with development. In the next article, I will be going over my implementation for player movement.

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

One day you’re questioning what on earth will ever make you feel happy and fulfilled.

Allowing FTP access on Windows Server 2016 hosted on Microsoft Azure

Life is a journey of twists and turns, peaks and valleys, mountains to climb and oceans to explore.

AWS: Impacts of IOPS on Database Platforms

My New Discovery In Oracle E-Business Login Panel That Allowed To Access For All Employees…

Day 8: 100 Days of Code — 7–12–2019

What are the types of cloud computing and how do you choose?

Jenkins pipeline setup for Docker based nodeJs application with GitHub integration

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
Gabe Gomez

Gabe Gomez

More from Medium

Adding a burst laser powerup

Speed. I am Speed.

Animating Sprites In Unity

Sci-fi Lab — Collider