Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

"Vibrating" blocks on mobile devices


Recommended Posts

Phaser defaults to SAP as well, so it's not that.


p2 World defaults are: 


gravity: 0, -9.78

friction: 0.3


Phaser sets both of these to 0. So you may want to change back. Although I see the collision demo sets gravity to 10 (values are p2, not px)


More importantly though he's adjusted the solver defaults:

        world.solver.iterations = 20;        world.solver.stiffness = 1e4;        world.solver.relaxation = 4;

You can do the same via a physics configuration object in the game constructor.

Link to comment
Share on other sites

Unfortunately it did not help.

I tried it with pure p2 and pixi - no phaser at all. Here as well: as soon as I set the anchor of the sprites to 0.5 they start "vibrating".


So I normalized the p2 position values to fit an anchor at 0,0. Now I got no vibrations and correct physics.

Link to comment
Share on other sites


  • Recently Browsing   0 members

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