Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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.

share|improve this question
    
You are looking for an Inverse Kinematics solution. Locomotion would be a good start –  Douglas Rae Apr 10 '11 at 8:11
    
Thank you for your reply. time to chec this out :) –  BallzOfSteel Apr 12 '11 at 6:56
    
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? –  Tim Holt Jun 1 '11 at 23:20
    
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. –  Jonathan Connell Jun 14 '11 at 10:00
    
What about some animation-blending? –  user712092 Jul 4 '11 at 14:54

4 Answers 4

The latest Overgrowth dev changes video show an example of how to do edge holding in a 3D game. This might be a little complex for your needs, but might give you a good idea of how other achieve this.

http://www.youtube.com/watch?v=GFu44oeLYPI&feature=relmfu

share|improve this answer

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.

share|improve this answer

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

share|improve this answer

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

http://www.3dbuzz.com/vbforum/sv_videonav.php?fid=3e87b1f570fc9c24ab89ad850ec2f71b

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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