I am creating a platformer using Phaser3 and am using the matter physics engine. Before, I was able to load in my tilemap just fine, but since then I have changed some code to the following.
const map = this.make.tilemap({key: 'map'});
//Create tileset
const tileset = map.addTilesetImage('tiles');
const platforms = map.createDynamicLayer(0, tileset, 0, 0);
map.setCollisionByExclusion([-1, 0]);
this.matter.world.convertTilemapLayer(platforms);
//Update the game at 30Hz
this.matter.world.update30Hz();
//Get hitboxes
this.shapes = this.cache.json.get('shapes');
//Set boundaries for physics
this.matter.world.setBounds(0, 0, game.config.width, 750);
//Player
this.hero = this.matter.add.sprite(0, 0, 'sheet', 'run_right/0013', {shape: this.shapes.s0013});
this.hero.label = SPIDERMAN;
//Don't want him rotating in the air
this.hero.setFixedRotation();
//Set our variable to do calculations
heroSize = this.hero.width;
Now, this loads, but my sprite is not appearing. I tried changing his X and Y values around, but still no luck. How can I make him appear again?
And also…did I call for collisions correctly?