zaji Posted June 22, 2014 Share Posted June 22, 2014 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 More sharing options...
lewster32 Posted June 22, 2014 Share Posted June 22, 2014 If you just collide with an immovable physics body covering the ground, you can use body.touching.down to determine when you're stood on it. Link to comment Share on other sites More sharing options...
zaji Posted June 29, 2014 Author Share Posted June 29, 2014 Thanks lewster32, that worked! Link to comment Share on other sites More sharing options...
Recommended Posts