1
Support / Re: Draw order with moving sprites
« on: September 07, 2012, 06:49:03 pm »
I had a similar requirement, I solved it pretty much the way unikron described. In my case all my actor sprites are at -2 z, and I added a fractional component to the z based on y, so I didn't need a huge dynamic range for my colliders/triggers.
float newZ = -2.0f - ((playfieldHeight - newY) / 1000.0f);
this works for me with my range of Y values.
You do have to make sure that anything that repositions actors goes through your actor's "move" interfaces and don't change the transform directly.
float newZ = -2.0f - ((playfieldHeight - newY) / 1000.0f);
this works for me with my range of Y values.
You do have to make sure that anything that repositions actors goes through your actor's "move" interfaces and don't change the transform directly.

Thanks for the insight. Something for the docs perhaps? (didn't see anything on this other than the bare bones interface in the script reference)
We devs tend to get too close to what we are working on and miss what only a fresh set of eyes (like someone like me in this case, coming at the tool fresh) would see or run into issues with the workflow.