nak3ddogs Posted July 21, 2014 Share Posted July 21, 2014 helo! 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*105and jump with velocity.y =-500; i use arcade physics Link to comment Share on other sites More sharing options...
Noid Posted July 21, 2014 Share Posted July 21, 2014 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 More sharing options...
nak3ddogs Posted July 22, 2014 Author Share Posted July 22, 2014 thx. i will try it. one of my friend use a rly old power book . and he cant play with the game coz the player always across the platforms. btw it is not a big problem. not he is the avarage Link to comment Share on other sites More sharing options...
nak3ddogs Posted July 22, 2014 Author Share Posted July 22, 2014 what is the perfect value for TILE_BIAS? Link to comment Share on other sites More sharing options...
Recommended Posts