Jump to content

phaser 2.0.2 arcade physics bug


Moe
 Share

Recommended Posts

hi,

     change the following in starstruck example:  game.physics.arcade.gravity.y = 250; to  game.physics.arcade.gravity.y = 600; and minimize the browser screen.

when you return the player sprite will skip one collision with the layer.

Link to comment
Share on other sites

Yes because it comes back in with a large delta timer and gravity is so high its forcing it to tunnel through the platform.

 

Set Time.deltaCap to something other than zero to limit the maximum the delta can ever rise to and it will prevent this. There's no "standard" value it should be, it's dependant on each game really.

Link to comment
Share on other sites

I can't recreate this even with a gravity of 1200, however the deltaCaps you're trying are massive :) The delta timer in a 60fps system would be 0.016 normally. So capping it at even 0.1 is still really high. Try somewhere between 0.02 to 0.05.

Link to comment
Share on other sites

delta is the number of ms that has elapsed between this frame and the previous frame, divided by 1000.

 

So in a solid 60fps system it's 16.666 / 1000 = 0.016 (recurring) - the 16.666 coming from 1000 (ms in a second) / 60, i.e. one frame every 16.6 ms for 60 frames in a second.

 

For 20fps it'd be 50 / 1000 = 0.05.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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