Jump to content

Arcade physics failed to detect collision


Nighthell
 Share

Recommended Posts

Hello!
I'm new in the phaser world, and I've encountered a collision problem. My character briefly enters in the ground when falling from great heights. I don't have gravity configured, and I'm using tilemap for the scenario.

Character Setting

game.load.spritesheet('char', 'assets/char.png', 32, 51);
player = game.add.sprite (32, game.world.height - 90, 'char');
game.physics.enable (player)
player .body.bounce.y = 0.2;
player .body.linearDamping = 1;
player .body.enable;
player .body.collideWorldBounds = true;

Setting the Scenery

game.load.image('tilesCenario', 'assets/tileset.png');
game.load.tilemap('mapa1', 'assets/mapa1.json', null, Phaser.Tilemap.TILED_JSON);
var fase = 1;
var nameFase = 'map' + fase;
map = game.add.tilemap (PhaseName);
map.addTilesetImage ('tileset', 'tilesCenario');
map.setCollisionBetween (1, 5);
map.setCollisionBetween (8, 12);

I am using Phaser CE v2.7.10.

Game: http://gamejolt.com/games/PrincessLucy/257174

Does anyone know how to help me with this problem?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...