How could I track my character's movement speed in real-time? Currently, I am able to track the speed value that it gives to the player but it doesn't show the actual speed (like acceleration, and deceleration created by Lerp). It would help me figure out the actual speed that the player had before jumping.

I tried to get an answer from chatgpt and it wanted me to pull time from the "OS" class, which I was not able to do.

Hmm, I don't know how do you make your character move. Normally checking the velocity is enough, and more beautiful.

But if you want to know the exact movement speed unrelated to anything else at that exact frame, I would just compare current position and previous frame's position, then divide it by delta time. Something like current_velocity = (current_position - previous_position)/delta
Dividing by delta means converting converting position change from one frame to one second.

That will give you the velocity (Vector), for the speed, you can use distance_to on that value. For example if the value earlier is Vector2 you can do Vector2.ZERO.distance_to(current_velocity). Since current_velocity is difference of position between previous frame and current frame, then distance between 0,0 to current_velocity is the speed.

    lol chatgpt is an idiot when it comes to godot, unfortunately.

    You can calculate your speed by tracking your position over time to get velocity, then taking the magnitude of that velocity.

    Add a variable called _last_position and set it to Vector.ZERO (idk if you're in 2d or 3d)

    In process, compare your 'position' to 'last_position' and divide that by delta. That's your velocity. Then set '_last_position = position'. You can assign the velocity to a variable or take the magnitude for the speed and assign that. It's up to you.