No announcement yet.

Draw order with tiled map

  • Filter
  • Time
  • Show
Clear All
new posts

  • Draw order with tiled map

    Hey guys,

    i have added a tiled map into the scene and a sprite that is supposed to be in the background. Unfortunately the sprite is always rendered in front, covering the tiled map no matter which values i set as the local draw order. Are tiled maps always drawn before anything else? Is there a way to set the draw order of a tiled map?

    Thanks in advance and cheers

  • #2
    After investigating a bit i found out, that when setting the draw order of the tiled map does not change anything, whilst changing the draw order of the TiledMapLayer does the job (In the editor the tiledmap shows in front of the sprite). Unfortunately it is not possible to save this change. When hitting the save button in the editor and starting the scene, it still is rendered behind the sprite. Is there a way to get around it?
    Last edited by Kande; 04-26-2017, 09:44 PM.


    • #3

      Hi Kande,

      Due to a limitation, the draw order of tiled map layers can't be changed, and will be calculated by the tiled map component. This component calculate his children draw order using the properties MinLayerDrawOrder and MaxLayerDrawOrder.
      By default these properties has too high values, and to achieve the behavior you want you must change these properties.



      • #4
        Thanks Daniel, that did the trick!