Jump to content

Arcade physics and gravity go through floor


pdiddles03
 Share

Recommended Posts

I was looking at the documentation around ArcadePhysics the other day and want to say there's a property you can set that addresses this issue. 

I think the problem is the Sprite is moving so quickly when it reaches the floor, that the update in its position is going to skip hitting the floor entirely, so there will be no collision. 

Ah found it. It's the 'tilePadding' property on the 'body' of the Sprite. 

http://devdocs.io/phaser/phaser.physics.arcade.body

Link to comment
Share on other sites

Try tweeking the TILE_BIAS property. You might be experiencing 'ghosting', which is, like @breed said, the fact that your character is so fast that there was no update where he was in the wall (there was just an update of him before the wall, and then after). 

Collision detection in Phaser does not use vectors : it moves the body to its new destination, and then checks collisions there. Too bad if there was something in the way.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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