Jump to content

[P2] Moving a Group doesn't move bodies of its children


pandavigoureux29
 Share

Recommended Posts

What you have happening is that p2 is really a separate system than phaser. Once it's connected to your sprite it becomes the puppet master and phaser handles the front end. So adjusting phaser's group position is only adjusting the way it is rendered, but p2 has no clue. Reading the p2 docs ( http://schteppe.github.io/p2.js/docs/ ) there aren't any group type objects so trying to integrate that directly would be tricky. I would probably write a function that adjusts the p2 bodies directly instead of adjusting the group position.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...