# How would I create a static jump height?

Hi,

so I know how to edit the mesh settings to change his jump height, but that’s a very basic level setting that lets you jump higher the longer you hold it. I have a triple jump blueprint right now and want him to jump at a certain height for each jump. How would I update this to do that?

Hey BrazenDoors,

I went ahead and created a simple triple jump system to show how you could approach this so here we go.

First of all, there’s a variable on the basic player character blueprint called JumpMaxCount, you’ll find that on the parent details panel, make sure to set it to 3

Then, you’ll need the following variables

GroundHeight is to keep track of what “ground” is for us, to handle cases such as the player jumping on a cliff, this will be the point of reference for the height of our jump.

JumpCount to keep track of our current jump index.

MinimumJumpHeightForXXJump is to set the minimum height of the jump at which the player can perform the following jump (which i assumed you want to do), the values i used are 500 for 2nd and 1000 for 3rd.

and here’s the logic itself

## Explanation

If jump is pressed and character is not falling (on ground), then we’re about to perform our first jump, store our ground height, call Jump function and set count to 1.

If jump is pressed and character is falling (in mid-air), then we’re either performing our second or third jump, subtract our current height from our ground reference to know how high we’ve jumped, check if the meets the criteria for our 2nd or 3rd jump and then call jump and set count accordingly.

To make sure you get the results i got, set your jump Z velocity to 1000

which will work just as you’re at the apex of the jump.

Hope that helps, feel free to ask anything.

Thanks for your post. I’m working on this now. But I’m stuck at trying to figure out the GetActorLocation node, for some reason it isn’t giving me the return value x/y/z options, it just gives me a yellow return value vector.

Right click the return pin and select “Split Struct Pin”, that will split the vector into X,Y,Z

Thank you for your fast responses. Sorry for my slow ones. I made your blueprint and it is precisely what I was looking for. I have one inquiry though, why is it that the fall jump only works when the Jump Z Velocity is set to a certain height? It only works if set at something like 1000. It didn’t work when I set it to 800.

That’s just because i wanted high numbers for the second and third jumps height, you can lower them and tweak the velocity till you get what you want. Just keep in mind that a jump velocity of 1000 doesn’t mean it will get you up 1000 in the air, there are other forces at play decelerating your jump which is mainly gravity with default settings

I actually had to go remember some physics equations to test this out for you lol so here goes

To calculate the apex of our height with gravity:
Vertical Velocity = Initial Velocity (which is 8meter/second in your case) * sin(angle of launch) which is 90 degrees

so Vertical Velocity = 8 * sin(90) = 8m/s

Maximum Height Of Jump = Vertical Velocity^2 / (2*gravity speed)

Maximum Height = 8*8 / 2 * 9.81 = 3.26meters

so the apex of any of your jumps at a velocity of 800cm/s is 326cm so you can set the second jump height at around 300, and the third at around 600 and it’ll work, or you can set it at like 325 to make your player really suffer lol