Hello Guest

Author Topic: 2d Toolkit/Unity depth sort priority  (Read 5741 times)

Babaganoosh

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 17
    • View Profile
2d Toolkit/Unity depth sort priority
« on: August 21, 2013, 05:25:11 pm »
Hey Dinesh,

I sometimes have some weird issues when sprites are set to the same Z depth, ie they would occasionally shift in front and in back constantly. Is there a way to fix this without explicitly making sure all objects have different Z depths? Thanks!

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2d Toolkit/Unity depth sort priority
« Reply #1 on: August 21, 2013, 05:47:16 pm »
No there isn't. The transforms applied can result in very slightly different floating point values, so it really isn't possible to deterministically sort these. However, if you have tk2d 2.2 beta, you can try the new render layer setting - its very much like setting z to determine sort order, but the sprite appears at exactly the same position.

x8105

  • 2D Toolkit
  • Jr. Member
  • *
  • Posts: 85
    • View Profile
Re: 2d Toolkit/Unity depth sort priority
« Reply #2 on: September 08, 2013, 03:56:48 pm »
quick question, are -#'s supported?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2d Toolkit/Unity depth sort priority
« Reply #3 on: September 08, 2013, 03:58:27 pm »
Yes