In my 2D Platformer character controller that has both a wall jump and a double jump ability, how would I approach implementing a feature that stops the player from returning to the wall they initiated a wall jump from, while still making sure my controls feel responsive? (like they did in Celeste, apart from the double jump)

So far, I have got a timer that starts when the player initiates the wall jump and stops the player from moving until the timer is over. I'm already not too happy with that approach because it leads to this moment where it feels like player input is basically ignored.

Now in addition, I realised that after the timer is over, while just pressing left won't be enough to return to (a higher part of) the wall, simply doing a second jump will enable the player to easily make their way up the wall.

  • \$\begingroup\$ Do you have any way to store what the last wall is the player jumped from? \$\endgroup\$ – Weckar E. Aug 16 '20 at 12:29
  • \$\begingroup\$ I can work out whether that wall is to the player's left or right, but nothing more specific than that. \$\endgroup\$ – Ben Aug 16 '20 at 13:03
  • \$\begingroup\$ @Ben What engine are you using? \$\endgroup\$ – Kevin Aug 22 '20 at 1:05
  • \$\begingroup\$ @Kevin I'm using Unity \$\endgroup\$ – Ben Aug 22 '20 at 19:21
  • \$\begingroup\$ Don't reset the double-jump when they touch the wall. That way, they can jump, wall-jump, double-jump, wall-jump again, but that's it. \$\endgroup\$ – user253751 Aug 26 '20 at 17:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.