How would I get a character to climb up a latter, rope, or a wall?
I just give the ladder a property called ladder, and then I just use a collision sensor on the player that looks for ladder, so when he hits the ladder with a forward key pressed,
I give them a slight Lin V on the local Y+, and a Linv on the z+ axis for the upward speed…
the slight move forward will suck them into the ladder, so they dont fall off. and the keyboard sensor, so they can fall just by not pushing against the ladder.
Ok, thank you, that works but…
I also want to be able to hold on, so that I could stay still. and if I was on a climbable wall to be able to go side to side also.
Is there a way that I could attach the actor to another object such as a ladder or a wall?
Thank you for your help so far.
he will be able to go left and right with the setup I described, you could even add a bit of VLin to the local x+ and x- to aid in moving left and right, elimate the +z for right and left too. so as long as they are holding a key they will stick to the ladder.
but I think that thats his point. He wants them to be able to not be pushing the key and still be holding on to the ladder.
You could make a near sensor plus a keyboard sensor. then add a motion actuator and give them a force of 9.81 upwards. that way they will stay floating while pressing the key. add another sensor for forward movement and another motion actuator to actually make the the player go upwards.
Mmph, your method works very well and is what I’m using.
To clarify the rest of what I want: say that I had climbed up a ladder that lead to the ceiling. Now I want to hang from the ceiling and move to the other wall, or do monkey bar’s for example. So how would I hang or hold onto a surface?
I suppose I could make an object that detects collision with the ceiling around the hands, then add an invisible plane underneath the character to hold him up while using a hanging animation to make it look like he’s hanging from the ceiling. But I want the pivot point in the hands at that point.
for monkey bars, do the same thing as the ladder only have a constant +z Vlin when colliding with the monkey bars, plus whatever direction you want him to move.
as far as moving the pivot point, just fake that with you armature animation for the monkeybars.
Most of the time the first bone in an armature I will make between the feet, to show me where the floor is, the next one is in the hips, and just parented to the one between the feet so he pivots on the waist… it makes so he can do flips and go horizontal for swiming and dieing animations. This also might help in the monkey bar swinging you are describing.
for an animation aid, I would make a ridgid body hinge of a torso shaped object swing on a couple other objects for arms… run the game engine and bake the IPO, then just use it as my animating stencil for the player model… just match the swinging frame for frame with the hinged example.
anyway, have fun
hmmmm, very helpful!