I am trying to get jump-through platforms to work, and work well, using arcade physics.
tile.setCollision(false, false, true, false) does most of the work.
However I am finding if the player’s body overlaps the top of the tile by around 50%, the sprite is pushed to the top of the tile instead of passing through it (see the jump in the gif).
I would like player to only land on the tile if it’s body if fully above the tile.
Has anyone come across this before? Know a fix / workaround? Perhaps impact physics is a better option?
Thanks for the suggestion @Thyebe, but I reckon the player will still pop to the top of the tile the moment you start moving downwards. I might try only checking the collision when the y position of the player is less than the tile, but that feels like a hack. I assumed there’d be a more natural way of implementing jump-through tiles with arcade physics .
Thanks @samme. I have had a play with the TILE_BIAS. When setting it low (<= 8) the player passes through platforms when falling from a great height. There is a trade off. But 12 seems to suit my needs.