Jump to content

player fall across the ground


Recommended Posts



i have got a issue with the gravity and collison.

my player falling across the floor at random moments. 
the most frequent when the focus is out of the game. and when i click in the game the player fall across the tiled ground.

but when i jump one after the collison work again

i have read when the player have too much y velocity it is possible. 

          player.body.gravity.y = 650;
          player.body.maxVelocity.y = 500;
and when i set the maxvelocity.y 
the error fired more rarely. 
one tile have 24*24 
and the player have 60*105
and jump with velocity.y =-500;
i use arcade physics
Link to comment
Share on other sites

It might happen during framerate drops or if your character is moving too fast. AFAIK arcade physics does only discreet collision detection meaning that if your character is in the air in one frame, and below the floor in the other, for the engine there was no collision since during no frame were the character and the floor overlapping. 


You can adjust this.game.physics.arcade.TILE_BIAS until it works well, you can adjust body.tilePadding http://docs.phaser.io/Phaser.Physics.Arcade.Body.html#tilePadding or you can try one of the other physics engines.

Link to comment
Share on other sites


  • Recently Browsing   0 members

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