Hello Guest

Author Topic: sprite under sprite  (Read 3927 times)

hromoydron

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 28
    • View Profile
sprite under sprite
« on: May 05, 2013, 03:44:09 pm »
I have background and objects, which would be create by clicking a button.
I need to have all objects in front of background. But some objects I don't see.
As I understand it depends on spriteCollection. 1spriteCollection I don't see and 2spriteCollection I see.
Because when I change 1sC to 2spriteCollection to objects which I haven't see before, all become okay.
How can I see objects with 1sC?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: sprite under sprite
« Reply #1 on: May 05, 2013, 07:29:17 pm »
Do you modify the z values on the sprites? That is how you order them.
In the default camera set up, smaller z value = closer to camera.

Eg. set background z value = 2
foreground items to 1.9

Thats just an example, you're free to use what you think is best there.

hromoydron

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: sprite under sprite
« Reply #2 on: May 05, 2013, 08:10:40 pm »
I change Z values and it help me. Thank's!