2D Toolkit Forum
2D Toolkit => Support => Topic started by: tyrannosaur_jet on November 15, 2012, 05:46:26 am
-
I'm trying to implement a system where sprites can be placed on layers -- by which I mean traditional layers sorted by z-index, determining what order objects appear in front of each other, not layers in the Unity sense.
I've had success just changing the Z value on the Transform of every sprite, but eventually, things just stop colliding. It seems like any colliders on tk2dSprites are scripted so their Z size always changes to 0.2, and if I keep increasing the Z transform of things, they go out of range really quickly.
Is there a better method for handling this than just by setting the Z transform of sprites, like I'm doing? And is there a reason why tk2d sets the Z size of its colliders to 0.2? Assuming there's not a reason, is there a way to change that?
Thanks for reading!
-
There is absolutely no reason apart from I had to pick some default number and 0.2 fit with the game we were working on at the time the decision was made. You can change it to anything you'd like in the sprite collection editor.
http://unikronsoftware.com/2dtoolkit/doc/reference/sprite_collection.html
The parameter you want is collider depth.
-
Awesome. Thanks so much!