Trying to create a collectible objects from object layer I've created with Tiled, however, don't know the proper way to map the objects and my image file which contains several images.

What would be the proper way of showing the image from the object layer created by Tiled?

So far I have come up with this routine which finds the Sprite but it seems the image itself is not loaded as seen in the image below.

   private pickupsGroup!: Physics.Arcade.StaticGroup
   this.pickupsGroup = this.physics.add.staticGroup();
   const pickupsGameObjects = this.map.createFromObjects('Pickups', { });
    pickupsGameObjects.forEach((object) => {
      const sprite = object as Phaser.GameObjects.Sprite;      



Tiled. (propsA.png consists of several images, bottom right corner.)


The pot object can be found in the map file outdoors1.json


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.