Hey everyone, I haven’t been on the forums very much lately. I haven’t made much threads either.
So I’ve always been trying to get games to work to their bests and have many options, so I always tried to figure out my own ways to do the common stump beginners come to when making any game, and that is ledge hanging.
I honestly don’t think this is the best solution to making ledge hanging, but I think it’s effective. It’s actually not really easy to use, because everything is made for specific things, so if you change something, you need to change it everywhere. Which is not the best way to do this, but it’s easier… for me a least.
up arrow to move the character, up arrow to climb up the wall.
the .blend is in the attachments, and you’ll see how it works in there. If it’s too complicated you can read this brief explanation:
What I did was have a ledge finder on the edge of my control box, which is how the character moves and such. The ledge finder (cube on the edge of control box) sends out a ray. When it sees a ledge property, it suspends the dynamics of the character, then gets the position where the ray hit, sets the position of the control box to where the ray hit, but I did a small math equation so it would set the position of the box correctly. You’ll see what I mean when you open the .blend and read the python script.
Now, basically, your ledge hanging, adding a small hanging animation.
Hardest and trickiest part. Make the character climb up the wall. I got the idea from sambassador on an old thread… What happens is that your control box moves up and over the ledge first. Then since the armatures are parented to it, they would move up with it, to fix this, I made the armature (while the control box was on top of ledge) I moved the armatures back to it’s ledge and made it’s animation there and climb up to fit where the box was. Now, I found out what frame the animation ended and then restored the dynamics, property ‘ledged’ was equal to false and I changed back to original state.
That’s it, hope it helps some people and I will be improving it, I want to perfect this, because I don’t just want to go with, leave as it is, it’s good enough, I want to go with, it’s nearly perfect.
Don’t mind my awful animation and enjoy,
ledge_hang.blend (317 KB)