PeterBuju

Members
  • Content count

    7
  • Joined

  • Last visited

  1. Hey Phaser people, I'm currently working on a 2d upperview point & click game, using Arcade physics. What I want to develop is a "smart movement" system, where if you click on a part of the map, your character shouldn't get stuck in obstacles, but pass around them. For now, I'm using tweens to move my character to the mouse position, which cancels the collision. Thus, it's a no go. this.game.input.onDown.add(this.movePlayer, this); movePlayer: function (pointer) { var time = 9.5; var duration = (this.distance(this.player.x, this.player.y, pointer.x, pointer.y) * time); this.tween = this.game.add.tween(this.player).to({ x: pointer.x, y: pointer.y }, duration, Phaser.Easing.Linear.None, true); } Any suggestions ? Thanks ! I've also attached a small screenshot/ drawing of what I strive to achieve.
  2. PeterBuju

    Ignore this

    Accidentally double posted: Here's the topic:
  3. PeterBuju

    Get restitution (or bounce) impact

    Thanks for the replies guys ! My mistake was that I didn't mention that I am using p2 physics collision, hence using the "restitution" term. The collision is implemented according to this example: http://phaser.io/examples/v2/p2-physics/collision-groups
  4. PeterBuju

    Get restitution (or bounce) impact

    Hello Phaser people, I'm currently working on a game where the player flies around and gets damaged by touching obstacles. What I want to do is damage the player according to the speed that the player crashed into the obstacle with. I see that the restitution (bounce) effect moves the player in the opposite direction according to the "impact". Is there any way I could get hold of this "impact" value and use it to deal a certain damage to my player ? Best regards
  5. PeterBuju

    error loading asset from URL

    SOLVED: My issue was that while on the localhost, things aren't case sensitive. The fact that my folder was named "Tutorial" and the link string was "tutorial" screwed things up when uploading it on the webserver.
  6. PeterBuju

    error loading asset from URL

    Any updates ? I can access my images through domain.com/assets/images/image.png, however get an error when trying to load the image (error loading asset from URL assets/images/image.png)
  7. PeterBuju

    How to use imagecollection + tiled?

    Also having the same issue. I hope somebody can answer that, or have you figured out the solution yourself ? If so, please share.