Jump to content

TileSprite and loadPolygon


Recommended Posts

Hey  I have a little problem !


I have:

this.player = this.game.add.sprite(0, 0, 'plane');this.ground = this.game.add.tileSprite(0, 0, 808+808, 71, 'ground', 1);...this.physics.p2.enableBody(this.player, true);this.physics.p2.enableBody(this.ground, true);this.ground.body.static = true;this.player.body.clearShapes();this.player.body.loadPolygon('physicsPlane', 'player');this.ground.body.clearShapes();this.ground.body.loadPolygon('physicsGround', 'ground');

And my player cross the ground. Also, the polygon of the ground in debug mode is not draw  <_< .  For the player everything works but i think it's because it's a Sprite.



Thank for your help and sorry for my bad english.

Link to comment
Share on other sites


  • Recently Browsing   0 members

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