Jump to content

Search the Community

Showing results for tags 'ps'.

  • 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. I'm new to Phaser, been playing with it the past few days. I noticed odd behavior when setting velocity in P2. This would not work as expected: bullet.body.velocity.x = this.sprite.body.velocity.x;bullet.body.velocity.y = this.sprite.body.velocity.y;After searching through the source I noticed that P2 converts the values from px to "meters" when setting the velocity, however it does not convert back to px when retrieving them. This happens in InversePointProxy for velocity, but properties using PointProxy would have the same issue as well. I was able to fix it temporarily with this code: bullet.body.velocity.x = this.sprite.body.velocity.x * -20;bullet.body.velocity.y = this.sprite.body.velocity.y * -20;I tried to update the phaser source files to do the conversion both ways so I wouldn't need to do this, but this seemed to cause other issues when running my game. I updated both InversePointProxy and PointProxy. Is this behavior by design? Here is an example of the change I made, Added this.world.mpxi() to the get.: get: function () { return this.world.mpxi(this.destination[0]); }, set: function (value) { this.destination[0] = this.world.pxmi(value); }
×
×
  • Create New...