Newbie alert!
I’m writing because I’m having a lot of issues creating the map of my game. I have a map made of two png layers, one for the bg and one for the floor.
I’ve loaded the floor png as an image and then I’ve added it to the game as tileSprite
this.floor = this.add.tileSprite(0, 508, 764, 65, 'floor').setOrigin(1);
then I’ve created the collider with the player
this.physics.add.collider(this.floor, this.player);
I wanted to use the onFloor() method to check if my player was on the floor, but even if it is on the ground the output is false