# Set tile depth / Access image or sprite of tile

**URL:** <https://phaser.discourse.group/t/set-tile-depth-access-image-or-sprite-of-tile/13502>\
**Category:** Phaser 3\
**Created:** [August 28, 2023, 8:31pm UTC](https://phaser.discourse.group/t/set-tile-depth-access-image-or-sprite-of-tile/13502 "2023-08-28T20:31:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bingbong](https://avatars.discourse-cdn.com/v4/letter/b/7ea924/32.png) [@bingbong](https://phaser.discourse.group/u/bingbong)\
**Post date:** [August 28, 2023, 8:31pm UTC](https://phaser.discourse.group/t/set-tile-depth-access-image-or-sprite-of-tile/13502/1 "2023-08-28T20:31:16Z")

</div>

TLDR: Is there a way to set a tile’s depth (based on its world y position)?  
In my Orthogonal game, I want the player to be able to walk behind a wall, or have the player stand in front of the wall.  
I’m setting the player’s depth to the player’s Y position.  
I’d like to set the wall tile’s depth to it’s Y position, so that if my player stands behind it, the wall is rendered first.

Unfortunately, the depth property of the tile seems to be ignored.  
In a depth sorting example of phaser 3, tiles are not drawn using the createLayer function, instead sprites are being added manually.  
Do I have to do the same?

---

<div class="post-metadata">

**Author:** ![samme](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/samme/32/5275_2.png) [@samme](https://phaser.discourse.group/u/samme)\
**Post date:** [August 29, 2023, 5:03am UTC](https://phaser.discourse.group/t/set-tile-depth-access-image-or-sprite-of-tile/13502/2 "2023-08-29T05:03:34Z")

</div>

Yes. Tiles have no depth.
