HugoMM Posted July 9, 2018 Share Posted July 9, 2018 I have images with depth, but once added to container, the z order are lost. Does anyone know how to fix it? Link to comment Share on other sites More sharing options...
rich Posted July 9, 2018 Share Posted July 9, 2018 Yes, don't put the image in a Container. Link to comment Share on other sites More sharing options...
HugoMM Posted July 10, 2018 Author Share Posted July 10, 2018 this is as designed? or going to be fixed? Link to comment Share on other sites More sharing options...
Tom Atom Posted July 10, 2018 Share Posted July 10, 2018 I did not try, but: Container has method sort(property) (https://github.com/photonstorm/phaser/blob/master/src/gameobjects/container/Container.js#L532). So, it should work to call it manually with any property. If still setting/getting depth on images in Container, it will probably fire depth sort on scene objects (https://github.com/photonstorm/phaser/blob/master/src/gameobjects/components/Depth.js#L52). Link to comment Share on other sites More sharing options...
ghclark2 Posted February 20, 2019 Share Posted February 20, 2019 Quote from container docs: When the Container is rendered, all of its children are rendered as well, in the order in which they exist within the Container. Container children can be repositioned using methods such as MoveUp, MoveDown and SendToBack https://photonstorm.github.io/phaser3-docs/Phaser.GameObjects.Container.html#sendToBack__anchor Link to comment Share on other sites More sharing options...
eddieone Posted March 19, 2019 Share Posted March 19, 2019 sendToBack instead of SendToBack ✌️ Link to comment Share on other sites More sharing options...
Recommended Posts