Hi, Your solution worked fine, I can block the character movement when reaching the max extension, and move back again.
But now I get a jittering movement when I reach the Maximum extension.
That’s because when I still press the input key to backward even though I’m at max extension, the input would reversed and the movement would be towards the wall for a frame; then the frame later, I’m not at max extension anymore (since I’ve been brought a little bit towards the wall), so I can go backward again, and the frame later I’m back at max extension, so I’m brought back towards the wall, and so on and so on…
Sometimes, If I press the opposite direction,I can even break the condition If I do so just when it reverse the movement input.
I’ve been banging my head on it to find a smooth solution but I can’t figure out a way of doing so.
The gif is here : https://media.giphy.com/media/ZEBfRGywqwXMArbXTB/giphy.gif