Jump to content

How to determine if a body is onFloor(), but against a TileSprite?


Recommended Posts

Hey guys,


Does anyone have experience with detecting a Sprite body against a TileSprite?


I am making a basic runner game and I would like to detect when the player has touched the "ground" (in this case, it's the top edge of a scrolling TileSprite).




I tried checking for Sprite.body.velocity.y === 0, which worked when the player was sitting on top of the bottom edge of the world, but with the addition of the TileSprite it hovers at around 24~28 y velocity.


Thanks :)

Link to comment
Share on other sites


  • Recently Browsing   0 members

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