Z-index for tileset layer

Hello, i create 3 Layer (grass - under player) (obstacles - colide with player) (extra- above player), but all Layer is under player, how to set “extra” Layer above player?

All Layer is created from tileset.

var grass = map.createStaticLayer('main', tiles, 0, 0);
    var obstacles = map.createStaticLayer('colide', tiles, 0, 0);
	var extra = map.createStaticLayer('extra', tiles, 0, 0);
	
	
	this.player = this.physics.add.sprite(50, 100, 'player', 6);
	this.player.setCollideWorldBounds(true);
	this.physics.add.collider(this.player, obstacles);

The easiest solution would be to create the extra layer after you create your player. You can also manually adjust the depth property on the layers and on the player - objects with a higher depth will appear above objects with a lower depth.

2 Likes

depth property is solution for my problem, thanks!