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

鬼滅之刃劇場版 無限列車篇 完整版 — (Demon Slayer the Movie:Kimetsu no Yaiba: Mugen Ressha-Hen) 2020~免費下

Demystifying RBAC in vSphere with Tanzu

Using Golang to Listen to and Parsing GitHub Webhooks

Beginning with Microsoft Azure: A journey

Readme File: Documentation to Help!

Excel Pivot Table error: the field name is not valid

How to run BusinessWorks 6.X bwagents and appnodes as Windows Services

Learn Servlet-JSP By Building A Social Network Website — Part XI

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

How to Make the Camera Shake Using Impulse Listener Extensions in Cinemachines Virtual Cameras

Using Light Probes in Unity’s HDRP

Learn to code by making 2.5 D Space Shooter Game .

2.5D Platformer setup: Movement and Collectibles