(Dash ability) Input key down problem

Hello,

I just started learning UE4 Blueprints and I have a problem when I want to make a dash ability. I’m using the launch character function and it works pretty well when I put a random value :

But now I’m trying to scale the time from how long the key has been down (thanks to the Get Input Key Time Down function) with a fixed vector. This is what I tried :

And unfortunately it doesn’t work… Did I miss something ? Is the Get Input Key Time Down function returns a time in ms or in seconds ?
Thanks for your attention.

Input Key Time Down will be 0 there since you only check it after the key has been released. It is no longer down.

What you can do instead is store the time the key was pressed then compare it to the time when it was released.

The node Get Real Time Seconds should help. Just store it on press then use it again and subtract the stored value to get the time that has passed.

Or if you still want to use “get input key time down” this will work:

ohh ok I understand thank you !

Thanks I’ll try this method too !

No Problem!