1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-05 19:31:35 +00:00

Fixes ParallaxLayer offset when ignore camera zoom

This commit is contained in:
Haoyu Qiu
2020-09-10 11:08:20 +08:00
parent ab7e7b8116
commit 5e2167631b

View File

@@ -101,7 +101,7 @@ void ParallaxBackground::_update_scroll() {
}
if (ignore_camera_zoom) {
l->set_base_offset_and_scale(ofs, 1.0, screen_offset);
l->set_base_offset_and_scale((ofs + screen_offset * (scale - 1)) / scale, 1.0, screen_offset);
} else {
l->set_base_offset_and_scale(ofs, scale, screen_offset);
}