Detect Analog Stick Speed

A want to know how I can make the game detect the speed the analog stick was moved.

For example, if it was moved quickly, like a flick, the character should dash, but if moved more slowly, the character would simply run. Think like Smash Bros.

Wait are we talking about how fast it was moved or how far from center?

How fast it was moved.

Are you using the Gamepads (controller) extension? If so, it has a function Gamepads::StickForce() that return a value between 0 & 1.

Yes, I’m using that, and played around with Gamepads::StickForce(). Mainly, trying to utilize that, and Timers in someway, but wasn’t able to get anything that really worked.

Why timers? I would have thought the value returned is the current force applied, which is what you want to know.

Unless force is downward pressure on the stick.

For me this is crazy idea
I would split it into checking time difference using compare two numbers condition
And checking TimeFromStart()

I would save its value to some var
Compare that saved value against its current value
To look only at some specific window time frame

Unless we are talking about ultra fast FAST then it would not even need that and could be checked for one frame

And i would compare pre previous value of stick force to current on next frame

What you want to do in my eyes will require A LOT jumping around it to get it to work as you want
Doable but i think i would do it in worst possible way

However feel lucky cause @MrMen have more knowledge than me
And most likely would have better idea how to achieve it than me

Thanks, @ZeroX4, but not this time. I’m just going by what I assume or work out from the available functions.

I also considered tracking the previous position and current position, but couldn’t see any functions to get those figures.

However, I’m wondering if force is the distance of the stick is from neutral. In which case, checking for the change in force over time would make sense.

But, these are just speculations. @BLTX will need to experiment to figure out what force actually refers to.

FORCE of stick is its distance from center
It is not angle
So that is exactly one of value you want to check

For me issue starts if i we want to check difference in 0.5 sec or 0.2 sec

That is not big problem
Problem starts if we want to check both or more

And adding more pain
What if we want to check WHATEVER was time between stick force being 0
To whatever value it went
It will be dynamic time not constant
Like for example i can pull stick to 0.7 in 0.2 sec
Or pull stick to 0.4 in 0.9 sec

I know how to do it
But how do i use it to determine something?
I can check how far from 0 stick force changed in some time frame
But if we are NOT always checking SAME EXACT time frame
Then i am lost here
And that is what BLTX wants

If its confusing then think about it like this
I can check if player lost 30 or 50 hp
I can check if he lost HP in 1 sec or 2 secs
But when i want to check HOW FAST he lost HP in some time frame
And that time frame is flexible then what the hell am i checking and how i am determining anything out of this?

Now you see issue i have in mind?

I feel its like we try to pull right hand while pushing left hand in opposite direction
And we are wondering what is going on that we get same values every single time

Or maybe i am missing something?
That is why i was hoping you have better understanding of it