how to climb a wall in BGE with or without Python?

Hi everyone, is there any script to make my character climb a wall like in GTA? Can i make it with logic bricks?

You mean like ledge hanging? You can use some empties parented to the player that raycast along z- axis, that somehow “grabs” the player to ray.hitPosition and sends a message to the armature to play hang anim.

(Don’t ask me for a practical script for what I’m saying, I’m still learning python :o)

there is a rig by laser blaster that could ledge grab,

3rd person rig, let me dig it up.

you could use this to get a idea,

No, actually is like this, i have the character infront of a wall and i want to climb it so i can go to the place that is behind that wall, i have the animation, the guy is nicely climbing the wall like a pro, and then he stay in that wall and now i can go and see what is behind the wall (in this case, in my scene, the way to my air base) so now, i think i was cleared :)) … check it out, here’s a video, but is in spanish, but is what i want to do. :)) Problem is, don’t understand his spanish XD (doesn’t explain well)
anyway here’s what i want to do:
jeeeee! and thanks guys to always answer my questions :slight_smile: is the only forum from what i got quick answers! the day i becom a pro, i will be there to help people like you’re doing with me :slight_smile: thanks!!!

the day i becom a pro, i will be there to help people like you’re doing with me :slight_smile: thanks!!!

Don’t wait to become a pro, because no-one ever is. The reason this forum works is because non-pro’s contribute. So if you see a question that you think you know an answer to, answer it.

On to wall climbing.
It sounds like it should be simple. I mean, you just reach up, and if there’s a wall there, you can grab it. Right?
Well, No. It’s actually pretty hard because:

  1. How to I tell if it’s a ledge, a wall, empty space etc?
  2. How do you actually hang from it
  3. How do you make the animations fit the wall-hanging?

Let’s look at the first part:
What makes something you can grab? The simpelest way is to make an object with a property ‘hangable’ (or something else sensible), and then use a script to check that the thing you are trying to grab has this property. But this is time-consuming to add to a level. I can’t really think of any other way though, that doesn’t involve a raycase, finding/matching faces, finding the face normals etc, which would be: complicated, slow etc.
So that isn’t too hard. Your character jumps, and if the hands hit something called ‘hangable’ then it is allowed to hang from there.

As for the actual hanging, it’s reasonably easy, you can simply set up a rigid body joint mid-game. You’d have to use python, but it isn’t hard to add joints at specific locations between specific objects

Doing the animation work is the really hard part, and I honestly have no idea how to tackle this. I tend to avoid human characters in my games so I don’t have to make realistic animations. Maybe someone else will have an idea.

My third-person template that BluePrintRandom mentioned has what you’re looking for- a ledge grab and climb feature with a pretty smooth looking animation (works for walls, too). My template is pretty complicated and difficult to set up, though. If you need any help with it, let me know. If you’d prefer for me to explain how I made it so you can learn for yourself, I can do that, too.

  1. Suspend the dynamics temprarily when the ray’s positive (If he’s going to use raycasts)?
  2. Create an arm IK setup and grab the IK bones to ray hit position?

It’s not “really” hard but will need allot of tuning.

true :slight_smile: … see i have almost all clear on that video now, but the problem is, THE LOGIC BRICKS! how to make that script to work??? I’ll give a try what you saying jackii, thanks again :slight_smile:

I actually have a invisible Cube that actuate like the wall, i make many cubes depend on what kind of obstacles i have infront. I have the script correctly pasted from the spanish video … only problem is, he have alots of logic bricks and i get lost, i don’t know the right combination of > sensors ---- controllers ---- actuators … cause he has alot, i’ll ask him on his webpage i hope he answer, anyway still have the question open if you guys want to give me some tips or advice, i know is hard, but not impossible!

Ok, this is a basic rig to detect the ledge if the object has the property “Map”


AStart.blend (449 KB)

and a nice steaming warm working example :smiley:


AhookUp.blend (457 KB)

And Hook Up and launch

Note - 1 hand hooking up only slows your decent :smiley: I like this


AhookUpAndLaunch.blend (480 KB)

And Finally (I am done for real) LoL

added armature and mesh

you can also make a “falling clock” that engages this only after the player has been in the air for 10 frames or so.

(then it can also initiate the “falling” animation)


CatchTheLEdge.blend (518 KB)

YEAAAH! now i know :)) … i’ll try to do it basing in your .blend

Thanks, check out the most recent, “Catch the ledge” it has a climb up action as well,

(note that every action is done with properties)

this can be handy for mapping physics linked to actions :smiley:

cool! can you post the link for the newest “catch the ledge” blend? Cause the one i downloaded only have the character moving down to up, which is very cool, but i want to see the climb action as well :slight_smile:

That is what I meant, (climb up is space)

Just replace the actions with anything,

I can help you with the property sequencer as well,

(the thing that controls the actions etc.)

so just make a animation and I’ll help you get it rolling…

cool!!! :slight_smile: thanks for your help buddy! i’m doing it now! i will post the .blend so you can see what i have … and the cool blur effect i have. :slight_smile:

And here’s the .blend file! bluePrint if you can help me! would be great! :wink: i’ll include you in my game credits! :slight_smile:

You can’t just choose advanced, upload files?

I am not sure I like the site you hosted,