Hello Guest

Author Topic: 2d sprite clipping/culling  (Read 4526 times)

sidshekar

  • Newbie
  • *
  • Posts: 1
    • View Profile
2d sprite clipping/culling
« on: June 28, 2013, 02:04:52 pm »
Hi, I am using 2dtoolkit to make a 2d game and sometimes objects go behind other objects even if they are placed in front of the other objects. To explain it better I have a link of the youtube vid below. Around the 35 second mark you can see the trees go behind the green hills. The tree's z value is 6.5 where as the hills in 6 and still at certain point the trees goes back and forth. I dont understand why this is happening. How to resolve this? Thx.

http://www.youtube.com/watch?v=LgpNFduKH70

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2d sprite clipping/culling
« Reply #1 on: June 28, 2013, 03:02:38 pm »
Are you using a perspective camera? If so, you need to set transparencySortMode to Orthographic at startup.
http://docs.unity3d.com/Documentation/ScriptReference/Camera-transparencySortMode.html