Hi,
What I'm doing is using the box2d for collisions & motions, and rather than using the body.m_userData to position a Sprite/MC I'm hoping to render the screen via a blitting engine.
I can pass the position data fine - but the problem I have comes when I want to depth sort - it's easy when I'm using either Sprites/MCs as you can sort/alter the depths, but with blitting they need to be drawn in order - which means I need to either loop thru the body list and then push the data to another array (which I then sort & draw), or work out a way of sorting the depths using box2d bodyList (which I've not been able to do).
Is there a way of sorting the bodies, or am I best just to do the double loop?
Thanks,
Charlie
What I'm doing is using the box2d for collisions & motions, and rather than using the body.m_userData to position a Sprite/MC I'm hoping to render the screen via a blitting engine.
I can pass the position data fine - but the problem I have comes when I want to depth sort - it's easy when I'm using either Sprites/MCs as you can sort/alter the depths, but with blitting they need to be drawn in order - which means I need to either loop thru the body list and then push the data to another array (which I then sort & draw), or work out a way of sorting the depths using box2d bodyList (which I've not been able to do).
Is there a way of sorting the bodies, or am I best just to do the double loop?
Thanks,
Charlie