Babylon.js icon indicating copy to clipboard operation
Babylon.js copied to clipboard

Modify Calculation of Inertia to Scale Based on Frame Rate

Open PolygonalSun opened this issue 3 years ago • 7 comments

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.

PolygonalSun avatar Aug 01 '22 22:08 PolygonalSun

updates?

It would really help to have consistent smooth camera movements across various refresh rate screens.

abolog avatar Oct 10 '23 01:10 abolog

cc @PolygonalSun

sebavan avatar Oct 10 '23 15:10 sebavan

Currently in progress (testing changes). Will update when PR is live.

PolygonalSun avatar Oct 31 '23 17:10 PolygonalSun

PR: https://github.com/BabylonJS/Babylon.js/pull/14482

PolygonalSun avatar Oct 31 '23 19:10 PolygonalSun

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 ^_^

abolog avatar Oct 31 '23 20:10 abolog

PR has been merged.

PolygonalSun avatar Nov 07 '23 18:11 PolygonalSun

This issue has been automatically staled because it has been inactive for more than 14 days. Please update to "unstale".

github-actions[bot] avatar Mar 27 '24 00:03 github-actions[bot]