Z-ordering on a isometric grid

  • 15 favourites

Attached Files

The following files have been attached to this tutorial:

.capx

isometriczorder.capx

Download now 184.07 KB

Stats

2,127 visits, 3,173 views

Translations

This tutorial hasn't been translated.

Tools

Simply it's a sequel to my other tutorial; Isometric mouse snapping.

Here is the demo.

Put some ground objects.

In the other tutorial we calculated our grid with two target values. We need to store these values for every ground object. Create 2 instance variable for ground object. Don't forget, for every ground object you need different values. You can calculate this values on debug.

If our player not overlapping ground objects, z-order is unimportant. if it overlaps check for the target value. If it's less or equal then the ground object, put it to bottom, else put it to the top.

But what if you have one thousand ground objects. You don't have to enter the instance variable data by hand. By combining our old formulas you can enter instance variables automatically.

You can find the capx.

.CAPX

isometriczorder.capx

Download now 184.07 KB
  • 0 Comments

  • Order by
Want to leave a comment? Login or Register an account!