Hi, I've started making a platform game and i'm having a bit of bother with collision detection when it comes the the player landing on the platform. heres the code
private function touching(e:Event)
{
if (Level.hitTestPoint(hero.x, hero.y, true) == true)
{
//trace("touching");
hero.vel = 0;
hero.y -= 1;
hero.Jump = false;
}
}
the problem is when the player is falling fast, he falls through the platform because he is falling faster than the height of the platform so the hitTestPoint co-ordinate never touches the platform.
Just wondering if anyone knows a way to solve this.
heres a link to my swf http://www.darrenfindlayportfolio.co.uk/
index2.html
Thanks in advance