Hum, that is a little different then I imagined. You are essentially climbing…
So is this the maximum range the character can reach or is he expected to be able to move forward?
if it’s a maximum range, then using what you already implemented which currently twitches you can just lock the movement by removing any input (axis value is 0 = no movement).
Now moving above that range is impossible via controller.
If you are making a climbing game this would be the point where you have to press a button to jump, for instance. And the dynamics for that are a little nutty but generally speaking, and stealing some Assassin Creed fashion thinking, jump toward the nearest observed grapple point or jump straight up and auto catch the same ledge to fall back down.
If you still need the character to move and detach you need to rely on axis strength for controllers. And keypresses for keyboard.
meaning using a controller you can tell if the user is pushing forward just a little (the axis is a fracion), if using a keyboard you get a straight up 1.
You have to isolate the axis button, and determine if it is coming from a key or a controller to drive the branches that matter.
this is near impossible when using Axis input configured with keypresses btw. But as a logical hack…
Save the previous axis value , set the axis value to a variable. You now have 2 axis to compare.
if the input before was 0 exactly and the input now is absolute |1| exaclty, chances are the user is at a keyboard. Chances because the controller can be just as fast when you jam it up…
either way, in this case you assume keyboard and lock the movement out when the apex is reached.
this means you are now in the state where input is locked, requiring either a jump or a key press.
This will force the controller user to back down gently and up gently revealing to the code he is on a controller, and moving to the branch where reacing 1 slowly can detach you.
it will also leave the keyboard user in a state where he will need to hit a different key, or let got the up axis.
At this point I would suggest the mesh move back to the middle of the grapple point slowly on it’s own if no controls are pressed. This makes both controller and keyboard users understand that the character couldn’t go that way or that the needed to jump.
Now that I think of it AC did just that anyway. If you edged up and could not jump the character would auto back down to a resting pose…
it may be worth your time to load up any of the AC games you have and break apart their motion system to note how they handled the different states/stages.
a good spot to just see animation might be ac2 in the scenes where Desmond only wears normal clothing so that no cloth simulation and moving parts obscure the view.
All that said, hopefully between setting the input to 0 and blocking their movement altogether and the checking of the axis strength you can concoct as solution to extricate the character from the wall…
Btw, a bonus detaching way… count seconds when at limit using a resetting timer.
if you are at axis 0, input is the detaching direction, and time elapsed is .5 seconds (where the axis is a constant 1) just assume the user wants to detach.
.5 seconds is a guess you’ll have to fine tune that to taste.