Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by Manuel

Hi, I am doing a puzzle game, so far so good, but when I select and drag parts of the puzzle through the stage is located behind the other pieces.

I really want to know how I get when a piece by clicking on the zIndex is higher and has stood on the other pieces

thanks

1 decade ago by Arantor

Each entity has a zIndex property, change that when dragging, reset it back to 0 when not, and make sure there is a call to the main game's sortEntities method.

1 decade ago by Manuel

i already change that property but still doesn't work. Do you know any other way to do this?

1 decade ago by Arantor

You're not calling the game's sortEntities() method too.

1 decade ago by Manuel

You're right, now it works
thanks a lote

1 decade ago by dominic

Note that as of Impact 1.19 you can also set the game&039;s <1> to #true instead of calling .sortEntities() manually every time.
Page 1 of 1
« first « previous next › last »