Hello Guest

Author Topic: TiledMap drawing order VS Object Drawing Order  (Read 3706 times)

DJVDJV

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 30
    • View Profile
TiledMap drawing order VS Object Drawing Order
« on: November 09, 2016, 01:17:39 pm »
Hellos.

I want effect as in example picture.
Just wonder how I should take and change object Z to get id depending tiled map Z?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: TiledMap drawing order VS Object Drawing Order
« Reply #1 on: November 15, 2016, 11:00:58 pm »
You'll need to add the Z delta in code (took out this option a long time ago). tk2dTileMapBUilderUtil.cs, GetTilePosition - needs a Z that relates to X and Y. In your case you want it going further away the higher it gets.

Switch to an alpha tested material that writes to Z.

You'll now find you can move your player sprite in Z to sort with individual tiles.