Tricks for Isometric Games in Unity
Events
Subscribe:  iCal  |  Google Calendar
Las Vegas US   8, Jan — 12, Jan
Zürich CH   31, Jan — 4, Feb
Leamington Spa GB   31, Jan — 3, Feb
Bradford GB   6, Feb — 11, Feb
Bradford GB   7, Feb — 9, Feb
Latest comments
by Dara Burke
51 min ago

Great breakdown of the process and optimization, thanks for sharing.

This article just not only provides great tools for level design. It's also useful vocabulary to express ideas with our team. https://xbeasts.blogspot.com/2018/12/Remove-Wall-Decals.html

Very well presented article. Thank You http://printingheaven.strikingly.com/blog/standard-movie-poster-size

Tricks for Isometric Games in Unity
23 July, 2018
News

The Unity team has recently shared an article by Martin Pane on making isometric games inside the engine. The task is not that simple, and these tricks can really help you get started. 

A short piece to get you interested:g

Let’s start by taking a look at the end result:

The first part we are going to focus on is on how to dynamically make sprites move around other sprites (behind and in front of them), giving a sense of real depth. The SpriteRenderer component has 2 properties that allow us to change the rendering order of sprites in the scene.
  • Sorting Layer
  • Order in Layer
To be able to change the rendering order of multiple sprites in real time, we need to modify some values so that when objects move around the scene, they always render correctly. We could modify the “Order in Layer”, but it only accepts integers, and we have a better option. We are going to use the Z axis.

The priority order when rendering a sprite in Unity goes like this, from highest to lowest:

If two sprites share the same “Sorting Layer” and “Order in Layer”, the one closest to the camera (in 3D World coordinates) gets rendered first.

Knowing this, we just have to write a small script that modifies the Z position a fixed amount relative to the Y position, right? You’re close, but first let’s explain a small concept crucial in understanding how to set a sprite’s ground floor. This “floor” is where the sprite would be touching the ground if it were a 3D object. Here are some examples:
What we have to do now is modify the Z position of the sprites when the Y position is modified. Let’s take a look at this in 3D:

Make sure to study the full guide here

Source: unity.com

Leave a Reply

Be the First to Comment!

avatar
wpDiscuz