2D Toolkit Forum
2D Toolkit => Support => Topic started by: cipher on September 23, 2012, 07:17:07 pm
-
Hello - I'm a new tk2D user, and wanted to start off by importing a character sprite made up of a few different parts. However, in both the game viewer and the scene viewer, depending on what angle I'm looking at my sprite, certain parts will appear in front of others, and vice a versa. I should note that this is not with just the camera, but with the general viewer as a whole. Placing pieces of the sprite slightly behind others does not seem to help, unless its way back and thus starts to look too 3D.
I've looked around and found similar problems, but no solutions that helped me, can anyone here help me out?
Thanks
-
There is a way to fix this. What you need to do is write a small MonoBehaviour which attaches to the camera, and sets this parameter:
http://docs.unity3d.com/Documentation/ScriptReference/Camera-transparencySortMode.html
Camera.transparencySortMode = TransparencySortMode.Orthographic.
This won't fix the scene view, but the draw order in game view will be far more predictable.
-
thanks, I'll give it a try