Climbing up and down a ladder

Hi,
I am having trouble creating an acceptable script for climbing a ladder.
A description of my scene is as follows:

I am using ODE for my rigid body physics (movement, collisions, etc.)
It is a FPS type game
The player climbs a narrow ladder into the hull of a plane.

What I am doing now is using a platform that lowers and raises when the player hits a certain area, using up & down key. TO prevent angular drift, I created a cage to hold the player in as it lifts. The problems arise when the cage appears and “impales” the player making him stuck. The other problem is the cage is to wide to fit through the doorway. Any other ideas or a better way for a ladder script? Thanks in advance.

hmmm…, platform & cage, it’s like an elevator & it’s shaft, right ?
So you push the platform up/down, while the shaft holds it (by the mean of collision), so it won’t roll to the side ?
But, doesn’t it the job of SliderJoint ?
Connect the platform with the environment (or None) using vertical SliderJoint.

goooood luck ! :slight_smile:

My suggestion would be:

  1. When he’s close to the ladder, turn off gravity for the player.

  2. Normally, the up and down arrows move you forward and backward. But when you’re near the ladder and facing the ladder, the meaning changes to up and down.

Thanks for the suggestions. Thats funny you mention the joints ynjh_jo, I was thinking that might work too.

I am curious about the gravity technique Josh, i’ll try that one too. Thanks again for your ideas.