Jump to content


  • Content Count

  • Joined

  • Last visited

About spiritabsolute

  • Rank
  • Birthday 07/18/1989

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I found a similar topic , but my map.collision[layer] === undefined
  2. Thanks for the answer. Your method I use to work with objects. I do not want my walls were objects on a separate layer. My wall tiles should be. I cut the tiles of the walls in the tiled editor.
  3. I created map by tiled editor. My collision layer have walls and it placed on the tile 64x64. I set collision for tile width 16px, because I need to the actual width of the wall was 16px. The remaining area is transparent. Tiled Editor allows you to do that, everything looks good. But, how to use a tile collision created in the tiled editor from phaser? Created tile collision, create an object in the json structure "tiles":{"2":{"objectgroup": etc. How to use the phaser api set Collision to these tiles? –°onvertCollisionObjects does not work. Cannot read propert
  4. I realized this: movePlayer: function() { this.player.directionX = this.game.input.activePointer.worldX - this.player.x; this.player.directionY = this.game.input.activePointer.worldY - this.player.y; this.player.endMovePointX = this.game.input.activePointer.worldX; this.player.endMovePointY = this.game.input.activePointer.worldY; this.player.body.rotation = Math.atan2(this.player.directionY, this.player.directionX) + this.game.math.degToRad(-90); var angle = this.player.body.rotation + (Math.PI / 2); this.player.isMoves = true; this.player.body.velocity.x = this.player.walkSpeed *
  5. this.game.add.tween(this.ship.body).to({ x: pointer.position.x, y: pointer.position.y }, 1000,Phaser.Easing.Linear.None,true); this method does not seem right and it does not work properly
  6. Hi all! How to move to the point of clicks at p2js? this.game.input.onDown.add(this.onClick, this); In the event handler I have "pointer.position". What's next? I did not find a single example. I found a similar question here, but there is no answer to it. http://stackoverflow.com/questions/36120249/precision-moving-a-body-using-phaser-and-p2-js-physics
  7. I was also interested in it! I was beginning to wonder why I use P2JS? How to understand whether I need P2JS. It may be better to use arcade?
  • Create New...