Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualBeerNutts

Posted 08 August 2012 - 01:56 PM

A quick thought is, if you you get a new collision (ie, it wasn't colliding in the last frame), then check the vertical velocity. If it's positive (moving up), ignore the collision. If it's negative (falling), then you need to check where the collision occurs on your player.

If it collides at the feet, then you can make the collision stick, and keep the player on top of the platform. If you're player collidies mid-body (or head, etc.), then he's probably moving left to right and falling, and needs to fall through.

That is just a quick thought about how I might try it, but i don't have any experience directly with this.

Good Luck!

EDIT: beat by Goran, but his idea is better than mine, to ensure the feet are above the top of the platform in question.

#1BeerNutts

Posted 08 August 2012 - 01:55 PM

A quick thought is, if you you get a new collision (ie, it wasn't colliding in the last frame), then check the vertical velocity. If it's positive (moving up), ignore the collision. If it's negative (falling), then you need to check where the collision occurs on your player.

If it collides at the feet, then you can make the collision stick, and keep the player on top of the platform. If you're player collidies mid-body (or head, etc.), then he's probably moving left to right and falling, and needs to fall through.

That is just a quick thought about how I might try it, but i don't have any experience directly with this.

Good Luck!

PARTNERS