Game Development Community

Climbing a steep ladder - How to?

by Richard Marrevee · in Torque 3D Professional · 12/03/2011 (5:37 am) · 6 replies

For my game I need the player to be able to climb ladders using the forward and backward key. The question is: how can this be achieved?

My idea is to create a new vehicle class derived from hovervehicle, use a invisible platform with a Mount0 node and depending on the height go up or downwards. Start and endpoint should be defined in the mesh of the ladder. Is this do-able or are there other methods?

Any help is appreciated.

Thanks.

About the author

Started programming in 1984 on an Oric, when time progressed switched to MSX, Amiga and finally the Windows PC with T3D. Now developing an epic fantasy game: The Master's Eye. Creator of the DoorClass pack and VolumetricFog pack @ richardsgamestudio.com


#1
12/03/2011 (6:34 am)
there is a climbable resource, cant remember the link offhand, but it works in 1.2
#2
12/03/2011 (8:11 am)
Ladders! yes! Iv'e been wondering about them while wandering around the 1.2 fps and hugging helplessly the fire escapes ladders.
#3
12/03/2011 (8:57 am)
Thanks deepscratch. This is the link you mentioned:

http://www.garagegames.com/community/resources/view/17283
#4
12/05/2011 (6:20 am)
Yes the climbable objects resource works great, we have it integrated into our build...

One tip though: Seems as if the ladders must be at a slight angle for it to work, so straight up-and-down ladders hugging a wall (like those in the turbolift shafts in our game) present problems.

We solved this by creating an invisible "ghost" ladder that sits in front of each wall ladder, and it is this invisible object that is actually set as the climbable object. It can be tilted properly to make it work, and the two objects together create the illusion of climbing a straight up-and-down access ladder.

Hope it works for you - we found it to be a great little resource to have in our binary as it can be used in so many ways, very easily.
#5
12/05/2011 (8:57 am)
This is one of the resources on my radar to implement at some point, and the solution leads me to ask this; what is actually used to climb and would modifying the collision mesh to be a pyramid work?
#6
12/05/2011 (1:57 pm)
Yes the resource works great. I just added a maxClimbSpeed to the PlayerDataBlock, and in the Player::UpdateMove function set the vertical speed to this value when climbing the ladder and preventing that gravity kicks in when climbing. A tilt angle of 1 degree (vertical plane) is enough to get the player start climbing the ladder. Descending the ladder still gives some trouble, due to the horizontal backward speed.