# Curious about vaulting

**URL:** <https://discussions.unity.com/t/curious-about-vaulting/598564>\
**Category:** Scripting\
**Tags:** Scripting\
**Created:** [September 22, 2015, 10:13am UTC](https://discussions.unity.com/t/curious-about-vaulting/598564 "2015-09-22T10:13:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lethn](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/lethn/32/386802_2.png) [@Lethn](https://discussions.unity.com/u/Lethn)\
**Post date:** [September 22, 2015, 10:13am UTC](https://discussions.unity.com/t/curious-about-vaulting/598564/1 "2015-09-22T10:13:10Z")

</div>

So you’ve all seen those really epic games like Battlefield 4 and Dying Light and all those other open world style games where there’s free running and climbing, I really like those games, but I keep wondering about how you would implement it correctly.

So the most obvious bit for me is when you jump you’ll have a ray cast detecting where you are on the ground and then another raycast ( perhaps? ) pointing to the ledge to detect whether you’re close enough to grab it. However, what about the stuff at the end? Would I be right in thinking that an animation just wouldn’t take care of this? You’d need to have some kind of code to detect that the player is actually climbing onto the ledge and then have them transform onto the top and they’ll be on the surface and of course you need to be able to have the player connected to the ledge the whole time the animation is playing.

It all looks quite complicated but I’d be pretty interested in finding out more information on it, however as usual with some of the more popular stuff there’s a bunch of asset store spam people are trying to hijack the conversations with instead of providing some actual explanations about how you’d do it all with just code.

---

<div class="post-metadata">

**Author:** ![Kiwasi](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/kiwasi/32/351502_2.png) [@Kiwasi](https://discussions.unity.com/u/Kiwasi)\
**Post date:** [September 22, 2015, 11:42am UTC](https://discussions.unity.com/t/curious-about-vaulting/598564/2 "2015-09-22T11:42:12Z")

</div>

Have you checked out inverse kinematics? I know next to nothing about it, but it’s basically a technique to position a model based on where it’s hands and feet should be.

---

<div class="post-metadata">

**Author:** ![Lethn](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/lethn/32/386802_2.png) [@Lethn](https://discussions.unity.com/u/Lethn)\
**Post date:** [September 22, 2015, 6:16pm UTC](https://discussions.unity.com/t/curious-about-vaulting/598564/3 "2015-09-22T18:16:37Z")

</div>

Not in the slightest, I’ll have a look, thanks, is there anything else I should be aware of when looking at vaulting? I get that collision detection will be necessary as well.

---

<div class="post-metadata">

**Author:** ![Lethn](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/lethn/32/386802_2.png) [@Lethn](https://discussions.unity.com/u/Lethn)\
**Post date:** [September 22, 2015, 6:39pm UTC](https://discussions.unity.com/t/curious-about-vaulting/598564/4 "2015-09-22T18:39:21Z")

</div>

Ooooo, now this looks very nice and interesting.

> **[Unity - Manual: Inverse Kinematics](https://docs.unity3d.com/Manual/InverseKinematics.html)**

Should I be using custom scripts or is their plenty of documentation on the standard Unity ones?
