Hi! I just worked on a project that involved velocity similar to what you are describing. I just made a project with only the basics (by deleting all of the other physics that I had coded into the sonic demo). It’s right here
You can edit the code or put it into your own game