Babylon.js
Babylon.js copied to clipboard
Modify Calculation of Inertia to Scale Based on Frame Rate
Currently, we calculate inertial drop-off of camera movements per render frame. What we will need to do to ensure a more uniform rate of movement is to scale our inertial drop-off. The idea would be take our frame rate/animation ratio and use that as our scaling factor.
Potential Issues/Things to look out for: Because some of our cameras have their own ways of handling inertial movement, whatever scaling solution we come up with may need to used with multiple other calculations.
updates?
It would really help to have consistent smooth camera movements across various refresh rate screens.
cc @PolygonalSun
Currently in progress (testing changes). Will update when PR is live.
PR: https://github.com/BabylonJS/Babylon.js/pull/14482
Works perfectly. Just tried it on a 360hz screen, and it's as smooth and consistent as 60hz. Same on touch mobile 120hz. Well done, you're the best ^_^
PR has been merged.
This issue has been automatically staled because it has been inactive for more than 14 days. Please update to "unstale".