Doing a distance check, then a Y velocity check, then casting a ray to the ground and, finally, the player. If everything checks out, jump!

Advertisements