Tuesday, August 9, 2016

xna - Wall Jump for 2D Platformer


I've been looking for a way to implement wall-jump in my xna game, but I can't find any information about it, can someone could someone please help me out ?



Answer



When a player collides with a wall while jumping (or, if you like, falling), turn on a flag for the next 100 milliseconds or so that causes an attempt to jump to successfully initiate a jump (ignoring any surface contact checks) with a fair amount of speed on the X axis in the direction away from the wall. Remember to turn the flag off early if a jump is in fact initiated.


No comments:

Post a Comment