-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v1.2 Release - Minification Tweaks + Velocity Module #8
Conversation
Ran into a testing problem. The velocity calculation code compares the previous coordinate vs the current coordinate, but over the script's refresh time, which is 0.2 seconds. Since coordinates are updated every 0.6 seconds, you end up with cycles that are comparing the same coordinates to each other, which results in a speed of 0. |
It seems I need to trade update time for stability. There are small moments of lag + update time offsets that cause the speed to jump around. I'm going to aim for a 0.4 second update time in exchange for a buffer of 3 vector magnitudes that will hopefully let me stabilize things |
turns out the buffer idea was a bad one. I instead went googling around for smoothing methods and settled on using exponential smoothing |
This PR requires in-game testing before I can merge it.
This PR does the following: