How to Climb to Walls???

Hiya, I’m looking for a method for allowing players to climb walls.

I’m planning on using a near sensor for the character to detect the wall, then the player would do the command to cling to it.

But How do I make the player stick to the wall. (I also want them to still have movement control)

is there some kind of constraint?

just give your player an integer property and name it say “wall climb” and have it set to 0. then set up some logic bricks to where when the player senses a property called wall (which give the wall a property called “wall”) to set your player’s property (wall climb) to 1. Now, give your player logic bricks so that when its “wall climb” property equals 1, to move up and down as apposed to forward and backward etc. Also remember to add an inverse sensor to your pre-existing w s a d function so that it will disable when your player’s “wall climb” property equals 1.

Thank you for your response. I like this, I’m sure this will work. But what about gravity?

My player is dynamic, so how would I control how much they are effected by gravity? (e.g like slowly sliding down a wall, or just sticking to it)

I made a simple example file on how to set this up. A video tutorial will follow soon.

http://www.gtown.ch/de/entwicklung/tutorials-blender/119.html

Hope that helps.

Dude…amazing!!

I got the blend file, I’m going to dig into it to figure out your set up.

Your video is amazing.
Let me know when you have a tutorial video I’ll keep checking on your web site.

Thanks you all for your help.

Strub, I’ve looked over your work, and I can’t figure it out

It works so beautifully, but I don’t know how.

for example, how did you make the player not react to gravity when wall climbing?

you need to look in the climb.py script.

if key up is positive:

MotClimbUP.linV = (0, 0, 3)

else:

MotClimbUP.linV = (0, 0, 0)

The constraint is used to stay at the wall. Furthermore there is also in the climb.py an important code so that the player stays upright:

#keep player upright
        GL.Obj.alignAxisToVect([0.0,0.0,1.0], 2, 1.0)

Hope that helps a bit

Yes, thank you
It’s much clearer now (I’m still a noob a script, maybe not even that)

But your explanation helps a lot.

Thank you again strub. And I’m looking forward to your game project.

that explains a couple of the questions i had as well.

I can’t wait for the tutorial video.

I’m currently making my climbing animations to impliment it. thx strub.

how do you do this with a rigged character