Hi guys!
I want to implement a ledge grabbing system. For that, I need to precalculate the distance the character needs to jump.
There are 3 scenarios that come into my mind that need to be checked:
A: Everything is okay, jump as far as possible.
B: The Character cannot reach the distant plattform correctly, adjust the jump distance so that the character “barely” reaches the ledge .
C: The Character cannot reach the distant plattform, adjust the jump distance so the character can grab the ledge only with the hands.
If the character only jumps as far as possible (how it is at the moment) the character slips off the ledge if the character “barely” touches the ledge.
I want to it to behave something simlar to this:
In Tomb Raider Anniversary, the character grabs automatically. I only want the adjustment of the jump distance.
Someone has the math behind this?