Detect player Z velocity

Hello there.

The idea is that I want my character (player), when falling down for X amount of time, have is gravity scale augmented to a set value.

Eg: My character as a Double Jump.
Lets say we only use the first of the jumps. I dont want him to take forever before touching the ground (which can be long). So, if the character is falling for more than 1.5 secs, set Gravity Scale to 10. But I also want to make sure that if I use the other jump while still falling it resets the 1.5 secs timer.

I know I can set it up so that when my character’s position is going down (-z) a timer could start but I haven’t found how I can set this up with blueprints.

Any help or direction is appreciated.
Thanks

Hey Skyler90!

So this is totally doable, and I’ll probably just work it out for you. Do you want your character to speed up as it falls or jump straight to 10x gravity after 1.5s?

Hey there.

Sorry for the late reply.
Definitly speed up as it falls. It should provide a better feel then just going from 0 to 10 times.

Thanks :slight_smile:


Here you go! Try this!

And this is the inside of the timeline.

Hey Mind-Brain,

Thanks a lot.
It does affect the fall speed but now it’s just a suuuuper slow fall. I don’t know if it has to do with what I already have written.

I’m still trying to find a way to adapt what you gave me still as I feel like I’m close.

2022-12-01 16-44-53.mkv (14.9 MB)

In the video, the first test is with the Blueprints added and then I remove it to show what it currently does (sry for the music, I forgot OBS records it).
Idealy, I want to be able to keep the same initial fall speed and increment it the longer you are falling.

Thanks again for replying.
See ya.

Hey! Did you make sure to set the timeline appropriately? The values in the timeline will be what directly changes your fall speed. Can you show a screenshot of the inside of the TL?

Haaaaaaa

Sweet sweet mistake from me.
I didn’t properly set the values. Now it works perfectly.

The first key is at 0.0/2.0 and the 2nd at 5.0/10.0.

2022-12-01 19-58-11.mkv (4.4 MB)

Thanks again, it helps a lot.

1 Like