-
1. Re: keeping one object above another...
Edithson Abelard Sep 14, 2009 6:26 AM (in response to polatkanfatih)Set Mario to have the highest depth at all time, you can set each
object added to the screen to a depth of 0 and that will always force
Mario to be at the highest depth.
checkout methods like setChildIndex and swapChildAt
Best Regards,
Edithson Abelard
Founder / Chief Interactive Developer and Multimedia Designer
Passion 47, Inc
www.passion47.com
-
2. Re: keeping one object above another...
polatkanfatih Sep 14, 2009 6:30 AM (in response to Edithson Abelard)it is not what i mean....
i mean that, mario should be at top of the box when jump on it in terms of y coordinate not z-index
-
3. Re: keeping one object above another...
Edithson Abelard Sep 14, 2009 6:38 AM (in response to polatkanfatih)In that case it depends on how your collision detection is setup as
well as where the registration points for both the boxes and Mario are
located.
If you already detected the collision that Mario is on top of the box
then setting Mario's y to the boxes y will have Mario standing on the
box. That is, if Mario's y registration point is center bottom, and
the box is top center.
I don't know if you have a gravity constant, if you do then disabling
it while Mario is on the box will save some system resources .
Best Regards,
Edithson Abelard
Founder / Chief Interactive Developer and Multimedia Designer
Passion 47, Inc
www.passion47.com

