I just started on a new project. In this project one of the main gameplay mechanics is that you can grab a ledge on certain points in a level and hang on to it.

Now my question, since I've been wrestling with this for quite a while now. How could I actually implement this? I have tried it with animations, but it's just really ugly since the player will snap to a certain point where the animation starts.

  • \$\begingroup\$ You are looking for an Inverse Kinematics solution. Locomotion would be a good start \$\endgroup\$ – Douglas Rae Apr 10 '11 at 8:11
  • \$\begingroup\$ Are you trying to simulate the ledge grab for any ledge, or are you wanting to have the player only be able to grab certain locations that you predetermine? \$\endgroup\$ – Tim Holt Jun 1 '11 at 23:20
  • \$\begingroup\$ If you make sure all your ledge heights are a multiple of a number, say 5, then it is much easier to do the math. \$\endgroup\$ – Jonathan Connell Jun 14 '11 at 10:00
  • \$\begingroup\$ What about some animation-blending? \$\endgroup\$ – user712092 Jul 4 '11 at 14:54
  • \$\begingroup\$ Or. What about decoupling animation from movement? Make a spring between animation centre and collision centre. Then let the animation centre slide to the collision centre. \$\endgroup\$ – user712092 Jul 4 '11 at 15:07

I would do it something like this, assuming I wanted to specifically control the grab locations...

  1. Use a player model that can be a ragdoll
  2. Place a small invisible entity at spots that can be grabbed.
  3. When the player jumps up, have their hands go upwards
  4. If the player's hands come within a certain trigger distance of an invisible grab spot, a "grab" occurs

To handle a grab...

  1. Let the player's body model keep moving on it's normal jump course
  2. Ragdoll move the hands to the grab location
  3. When the hands reach the grab location, lock them in place (they "grab")
  4. Let the body now become a ragdoll with the hands pinned to the grab spot

To handle a pull up from a ledge...

  1. Since the player's hands are pinned at the exact climb spot, you are all set for a "climb up" animation
  2. Play the "climb up" animation

I'm playing pretty loose here with the details of how one moves & controls the ragdoll I admit. The idea though is to get those hands pinned onto the grab spot and let the player hang there pinned by the hands to the grab spot.


There is a tutorial on how to implement simple IK http://freespace.virgin.net/hugo.elias/models/m_ik.htm .


3D buzz have a 3rd person character system tutorial which includes a climbing system. It's under the "Integrating Maya Characters"


I haven't watched all the videos yet but the final result looks good and I'm sure could be extended to include other aspects of climbing.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.