Jump to content

Search the Community

Showing results for tags '2.4.1'.

  • 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 just decided to move my game from 2.3 to 2.4, only to find my sprites with p2 bodies have gone insane. I managed to narrow it down to this test code: function create() { game.physics.startSystem(Phaser.Physics.P2JS); var sprite = game.add.sprite(100, 50); //drawing var graphic = game.add.graphics(); graphic.beginFill('0xff0000'); graphic.drawCircle(100, 50, 10); graphic.endFill(); sprite.addChild(graphic); // Create our physics body. game.physics.p2.enable(sprite, true); sprite.body.setCircle(10); //drawing var graphic2 = game.add.graphics(); graphic2.beginFill('0x0000ff'); graphic2.drawCircle(100, 50, 10); graphic2.endFill(); sprite.addChild(graphic);}var game = new Phaser.Game(800, 600, Phaser.CANVAS, '#phaser_parent', { create: create});Basically,the first graphic gets given a separate physics body at (0,0) and starts with velocity for some reason (because its start position overlaps worldbounds maybe?) The second graphic, added after physics was enabled, works as expected. Also just realised the second graphic is place with global co-ordinates, and the first is placed relative to the sprite. Are these bugs or expected behaviours I've misunderstood/not read the docs properly?
×
×
  • Create New...