The ultimate climbing and bouldering simulation game. Explore and climb 250 real world routes, create your own routes and compete against your friends from the safety of your computer.
[img]{STEAM_CLAN_IMAGE}/43535104/006b047528f35ba0efc58b3d178235acfca84c12.png[/img]
Like we mentioned in the previous article: for New Heights, creating a realistic physics-based human climber was key for making a genuine climbing experience. But how does one create such a thing? Well, having a human character with realistic physics is mostly a solved problem by the industry: you use ragdolls. The real trick is trying to control that ragdoll in such a way that you can use it to climb walls and boulders in a realistic way. That is what led us down the rabbit hole of Active Ragdolls. That hole goes deep, way deeper than you’d think at first glance.
For starters we needed our ragdoll to stand up, walk and follow animations like a normal character. For this we used an off the shelf solution which simply did that part for us, great! But just having an animated character is not enough to scale walls. We needed to be able to control the limbs separately and aim them wherever we wanted. If you’re familiar with game development, or if you read the previous article you already know the next step: we added an Inverse Kinematics (IK) solution to the project so we could point the arms and legs wherever we needed. To help us out with that we used an IK package which contains a lot of different IK solutions for us to use. At this point we had a solution for making a ragdoll follow an animated character and we had a solution for making the animated character point its limbs wherever we wanted with IK. Now we just had to combine the two of them together!
Alright, easy enough. We just make our ragdoll follow our animated character climbing up the wall! And…. wait. If our ragdoll simply follows the movements of our animated character we still don’t have any realistic physical climbing! We just have what we had before, except more wobbly because of the ragdoll. Clearly, in order to have an actual physics-based climber our ragdoll needs to be in the lead. We need to do it the other way around: we should make our animated character follow the ragdoll!
[img]{STEAM_CLAN_IMAGE}/43535104/3456c3c088fd153d149b427b1de5282a7767c1be.gif[/img]
[i]Rest In Peace :([/i]
Oh yeah that’s right… Puppetmaster was using our animated character to keep our ragdoll upright. Without that reference, we just slump down like a sack of potatoes. Clearly there are two different situations we need to differentiate: walking and climbing. For the walking we can just use Puppetmaster to make our ragdoll follow the character animations like before, nothing fancy here.
[img]{STEAM_CLAN_IMAGE}/43535104/029ce857ef1a840d9a83f512f68c6fd22184e67f.gif[/img]
[i]Our ragdoll can walk![/i]
But when we start climbing, the physics need to take over and make our animated character follow the ragdoll. So as soon as we grab the wall, we switch control over to the ragdoll!
[img]{STEAM_CLAN_IMAGE}/43535104/365c3c9ec861d1896a2456ebbb66cd2163154318.gif[/img]
[i]When switching to “ragdoll mode” our character just falls down[/i]
Alright, that’s a start! Now let’s work on aiming the limbs of the ragdoll. As we said before, we can simply use IK to make a limb aim towards a certain point. But we can’t just set the positions of the ragdoll limbs directly, we need to use physics! Otherwise our limbs might clip through rocks or even worse: they could tear our ragdoll apart. To achieve this we make our animated character follow our ragdoll and then perform IK on the limbs of the animated character (shown as the blue skeleton). With this animated limb as our reference, we can then add physics forces to our ragdoll limb to make it match the animated limb. For example: the ragdoll’s shoulder, elbow and hand use physics to move towards their corresponding parts on the animated character as indicated by the spheres. In other words: the ragdoll arm tries to use physics to align itself with the animated arm.
[img]{STEAM_CLAN_IMAGE}/43535104/88d503eb4e5392f356d9e39afde0eb744233957e.gif[/img]
[i]The ragdoll arm tries to align itself with the spheres[/i]
Nice, now we can actually aim our limbs and grab the wall. Let’s start climbing!
[img]{STEAM_CLAN_IMAGE}/43535104/413d0856edd7ebcdce5995b9c0baece55f1d9089.gif[/img]
[i]Our character is too weak to climb, she needs to drink more protein shakes[/i]
Oh no… our climber is too weak to pull itself up in any way. We can aim our limbs but there’s nothing that can actually make our ragdoll move up and climb the wall. Right now, we are just weak. We need muscles. WE NEED TO BULK.
In the next article we’ll talk about how we can actually make our ragdoll go up towards… new heights?