How to do a Ledge Grab?



  • If you haven't played it already, please refer to the Atmosphere Demo I made below:

    I am thinking about adding a platform that the character can grab (sorta like how Lara Croft does in tomb raider). The logic for it seems it will be tricky. I do have some code to reference from a Godot game someone made of a Castlevania remake.

    Anyone have any tips of how I could do this? I can create an animation and I figure I might have to check if the character collides on the left side of an object. I'm mainly wondering what conditionals I need to consider, and how to actually get the character to pull herself up onto the platform.

    Please provide Pseudocode terms

    Found some text code to reference: http://answers.unity3d.com/questions/812417/how-do-you-hang-on-to-a-ledge-in-a-2d-game.html



  • 0_1494607363711_IMG_3264.PNG

    What I hav so far (with bugs)



  • Place a hidden object near the wall to grab slightly higher than the character when player jumps it collides with hidden object then play climbing animation and behaviour move to point or move by and it should reach top of the wall.I am not sure but sometimes hidden objects are disabled you can also set color of object 0 opacity to hide it.



  • @Hakan Sounds similar to what I did to achieve the image above except I checked collision with the left side of the platform, played the animation and moved the character to the red box (which will be invisible eventually).

    The issue I am facing is actually making the character get onto the platform and stand up (I had to make the character passable for this to work due to collision issues and now I have to make it non-passable....)
    0_1494611271828_IMG_3265.PNG



  • It doesnt seem impossible to do,with a couple tries it should be possible to do it.I liked the light that makes the character look original color,it makes a different sense.





  • @Hakan The light is still there. I copied the original project to test this out (so I don't accidentally mess it up). :)



  • I cant open the video


Log in to reply