Hello, trying to set a image onto map from the ObjectLayer I’ve created with Tiled.
However the object tile looks like this in the game.
I could I have missed?
Object in Tiled
CreateFromObjects routine
private createPickups() {
this.pickupsGroup = this.physics.add.staticGroup();
const pickupsGameObjects = this.map.createFromObjects('Pickups', {});
pickupsGameObjects.forEach((object) => {
const sprite = object as Phaser.GameObjects.Sprite;
sprite.setVisible(true);
sprite.setDepth(9);
this.pickupsGroup.add(sprite);
});
}
Corresponding config in map:
[code]
{
"draworder":"topdown",
"id":13,
"name":"Pickups",
"objects":[
{
"gid":4873,
"height":32,
"id":5,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":32,
"x":431,
"y":541
}],
"opacity":1,
"type":"objectgroup",
"visible":true,
"x":0,
"y":0
},
[/code]
I have verified I’ve loaded the corresponding tilemap where the image is.