Closed Antriel closed 3 months ago
To resolve the jittery camera follow issue in v3.85.0 Beta 2, modify the Camera.preRender
method in src/cameras/2d/Camera.js
. Specifically, remove or adjust the Math.floor
application to the scroll factor when rounding is enabled. This change will revert the behavior to smooth following without pixel rounding. Example modification:
// src/cameras/2d/Camera.js
preRender: function () {
// Remove or adjust this line
// this.scrollX = Math.floor(this.scrollX);
// this.scrollY = Math.floor(this.scrollY);
// Add smooth following logic here if needed
}
/changelog/3.5 /changelog/3.5/CHANGELOG-v3.5.md /changelog/3.54 /changelog/3.23 /.github/ISSUE_TEMPLATE /changelog/3.54/CHANGELOG-v3.54.md /changelog/3.13/CHANGELOG-v3.13.md /changelog/3.80/CHANGELOG-v3.80.md /changelog/3.1.1 /changelog/3.13 /changelog/3.15 /changelog/3.85/CHANGELOG-v3.85.md /changelog/3.18/CHANGELOG-v3.18.md /changelog/3.9/CHANGELOG-v3.9.md /changelog/3.15/CHANGELOG-v3.15.md /.github/ISSUE_TEMPLATE/bug_report.md /.github/CONTRIBUTING.md /changelog/3.17/CHANGELOG-v3.17.md /changelog/3.1.1/CHANGELOG-v3.1.1.md /changelog/3.16.2/CHANGELOG-v3.16.2.md /src/cameras/2d/events/ZOOM_COMPLETE_EVENT.js /changelog/3.60/Camera.md /changelog/3.55.2/CHANGELOG-v3.55.2.md /changelog/3.11/CHANGELOG-v3.11.md /changelog/3.23/CHANGELOG-v3.23.md
Thank you for submitting this issue. We have fixed this and the fix has been pushed to the master
branch. It will be part of the next release. If you get time to build and test it for yourself we would appreciate that.
Demo: https://phaser.io/sandbox/5rxAdUsy It's jittery in 85 beta 2, smooth before. Happens because of https://github.com/phaserjs/phaser/commit/26d85978d2494310c95760020ea62dca8b8b122a I think. Now the values jump a whole pixel, and then it smoothly follows to align. Before it smoothly followed constantly, as there was no rounding happening.