Mario 64 wall jump for 2d platformer?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By LotusOrb

How do I implement a wall jump where you can only jump once per same wall. Meaning you could climb infinitely if you had two walls facing each other but could only wall jump once if there was one wall.

:bust_in_silhouette: Reply From: Surtarso

I think I would go about this problem with left/right basis…

if not grounded
if touched a wall pressing right, can walljump_right true, left false
if touched a wall pressing left, can walljump_left true, right false

thanks easy explanation

LotusOrb | 2020-11-20 08:44