Hello Guest

Author Topic: Rendering order of child sprites  (Read 4280 times)

kartast

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 7
    • View Profile
Rendering order of child sprites
« on: September 07, 2013, 05:03:52 am »
Hi,

I have a group of sprites which rendered in the correct order when not group.
But when I group them under empty game object, I cannot set the order at which they are rendered. Not by z position or by render layer in 2.2 beta 1.
Can you help me with this?
I need to group them to animate the objects together

Thanks

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Rendering order of child sprites
« Reply #1 on: September 07, 2013, 09:27:47 am »
You should be able to position them using z. Unless your empty game object is at a random position to start with? Are the child positions roughly 0, 0 in x and y?

kartast

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Rendering order of child sprites
« Reply #2 on: September 07, 2013, 09:35:05 am »
Empty parent game object is not in random position, but the children are all in (0,0) x and y.
If I create a new child, it will render in front of others, regardless of the z position.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Rendering order of child sprites
« Reply #3 on: September 07, 2013, 09:41:59 am »
Please create a repro case and email to support at unikronsoftware.com - this should work fine, indeed the UI stuff uses this almost everywhere.

kartast

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Rendering order of child sprites
« Reply #4 on: September 29, 2013, 12:35:29 pm »
I found the problem to this. For some reason when I drag an object to be child, the child scale become (0,0,0) and the parent z scale will be 0. Setting it to 1 will fix it. Thanks