# How to make a double jump function for a 2D platformer

**URL:** <https://forums.unrealengine.com/t/how-to-make-a-double-jump-function-for-a-2d-platformer/359607>\
**Category:** Blueprint\
**Tags:** platformer, unreal-engine, UE4, Blueprint, question\
**Created:** [June 4, 2016, 1:32pm UTC](https://forums.unrealengine.com/t/how-to-make-a-double-jump-function-for-a-2d-platformer/359607 "2016-06-04T13:32:23Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sebburito](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sebburito](https://forums.unrealengine.com/u/Sebburito)\
**Post date:** [June 4, 2016, 1:32pm UTC](https://forums.unrealengine.com/t/how-to-make-a-double-jump-function-for-a-2d-platformer/359607/1 "2016-06-04T13:32:23Z")

</div>

Hi

We are making a 2D platformer and would like to add a wall jump function to the game. What is the easiest way to do this with blueprints?

Thanks!

---

<div class="post-metadata">

**Author:** ![Derzo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Derzo](https://forums.unrealengine.com/u/Derzo)\
**Post date:** [June 4, 2016, 2:20pm UTC](https://forums.unrealengine.com/t/how-to-make-a-double-jump-function-for-a-2d-platformer/359607/2 "2016-06-04T14:20:26Z")

</div>

So you want to add wall jump or double jump function? 😃

I assume you meant wall jump, so here it is.

Wall jump is pretty simple, you have bool _IsOnWall_ and and float _WallNormal_. On event hit on CapsuleComponent (Make sure simulation creates hit events is on), set the _IsOnWall_ to true and _WallNormal_ to Impact normals X axis. After that delay 0.1 seconds and after it, set _IsOnWall_ to false.

When the jump function is called, add a branch that checks the _IsOnWall_. If not, jump regularly. If is, add impulse to character movement: Make vectorX:_WallNormal_ Z:1 and after the make vector, multiply it by float _WallJumpImpulse_. The number must be really high sometimes, just play with it. I think that’s it, cheers! 🙂

---

<div class="post-metadata">

**Author:** ![Sebburito](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sebburito](https://forums.unrealengine.com/u/Sebburito)\
**Post date:** [June 4, 2016, 3:13pm UTC](https://forums.unrealengine.com/t/how-to-make-a-double-jump-function-for-a-2d-platformer/359607/3 "2016-06-04T15:13:52Z")

</div>

Sorry for the confusion, yes we ment wall jump.

Thanks for the quick response! 🙂

---

<div class="post-metadata">

**Author:** ![Derzo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Derzo](https://forums.unrealengine.com/u/Derzo)\
**Post date:** [June 4, 2016, 3:18pm UTC](https://forums.unrealengine.com/t/how-to-make-a-double-jump-function-for-a-2d-platformer/359607/4 "2016-06-04T15:18:39Z")

</div>

No problem! 🙂

---

<div class="post-metadata">

**Author:** ![Sebburito](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sebburito](https://forums.unrealengine.com/u/Sebburito)\
**Post date:** [June 4, 2016, 3:36pm UTC](https://forums.unrealengine.com/t/how-to-make-a-double-jump-function-for-a-2d-platformer/359607/5 "2016-06-04T15:36:40Z")

</div>

Would it be possible for you to make this as a blueprint and send a screen shot? That would be much appreciated. We can’t seem to get it to work, we are sort of new to Unreal.

Thanks again!

---

<div class="post-metadata">

**Author:** ![Derzo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Derzo](https://forums.unrealengine.com/u/Derzo)\
**Post date:** [June 4, 2016, 3:54pm UTC](https://forums.unrealengine.com/t/how-to-make-a-double-jump-function-for-a-2d-platformer/359607/6 "2016-06-04T15:54:28Z")

</div>

Here you go 🙂

[![](https://d3kjluh73b9h9o.cloudfront.net/original/3X/4/1/41346ee056c21c4af6e6c50b29a7d96a85de7d9a.png) ](https://i.imgur.com/eS5wfWw.png)

_(pssst I’m also trying to beat Luos at answerhub leaderboards, so I’m begging for some karma… 😉_

---

<div class="post-metadata">

**Author:** ![Sebburito](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sebburito](https://forums.unrealengine.com/u/Sebburito)\
**Post date:** [June 4, 2016, 4:04pm UTC](https://forums.unrealengine.com/t/how-to-make-a-double-jump-function-for-a-2d-platformer/359607/7 "2016-06-04T16:04:13Z")

</div>

You are our hero! \<3

Thanks a lot!

---

<div class="post-metadata">

**Author:** ![Sebburito](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sebburito](https://forums.unrealengine.com/u/Sebburito)\
**Post date:** [June 5, 2016, 10:23am UTC](https://forums.unrealengine.com/t/how-to-make-a-double-jump-function-for-a-2d-platformer/359607/8 "2016-06-05T10:23:15Z")

</div>

Hi again!

So we have a small problem. The Break Hit Result is there but we don’t have the Impact Normal X option, so there is no way to connect it with the Set Wall Normal. Are we doing something wrong?  
93419-

---

<div class="post-metadata">

**Author:** ![Derzo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Derzo](https://forums.unrealengine.com/u/Derzo)\
**Post date:** [June 5, 2016, 10:25am UTC](https://forums.unrealengine.com/t/how-to-make-a-double-jump-function-for-a-2d-platformer/359607/9 "2016-06-05T10:25:20Z")

</div>

Right click on the _impact normal_ and _Split Structure Pin_.

---

<div class="post-metadata">

**Author:** ![Sebburito](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sebburito](https://forums.unrealengine.com/u/Sebburito)\
**Post date:** [June 5, 2016, 10:32am UTC](https://forums.unrealengine.com/t/how-to-make-a-double-jump-function-for-a-2d-platformer/359607/10 "2016-06-05T10:32:12Z")

</div>

Well that was easy. Thanks yet again! 🙂

---

<div class="post-metadata">

**Author:** ![samuelhely](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@samuelhely](https://forums.unrealengine.com/u/samuelhely)\
**Post date:** [June 5, 2016, 6:39pm UTC](https://forums.unrealengine.com/t/how-to-make-a-double-jump-function-for-a-2d-platformer/359607/11 "2016-06-05T18:39:58Z")

</div>

The Unreal Stick Figure 2D already has a double jump implemented.

Just open the Learn tab in the launcher and look for it.
