Jump to content

Search the Community

Showing results for tags 'moving player'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 1 result

  1. Hello, I have problem with moving player out of Canvas with help of moveToXY function. The canvas size is 400x600 and the tilemap is 2000x2000. When I click on destination point the player is going to destination but he always stop on hidden barrier (Canvas bounds) and can't get further. When I move the player with keyboard he can go anywhere but with mouse click he can't make it. Here is my code in update function: if (this.game.input.activePointer.isDown) { this.playerX = this.input.activePointer.x; this.playerY = this.input.activePointer.y; console.log("X: " + this.playerX + " Y: " + this.playerY); } if (this.game.physics.arcade.distanceToXY(this.player, this.playerX, this.playerY) > 5) { this.game.physics.arcade.moveToXY(this.player, this.playerX, this.playerY, 60, 0); }
×
×
  • Create New...