mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Fixes ParallaxLayer offset when ignore camera zoom
(cherry picked from commit 5e2167631b)
This commit is contained in:
committed by
Rémi Verschelde
parent
766b637ed0
commit
fa81e3621f
@@ -109,7 +109,7 @@ void ParallaxBackground::_update_scroll() {
|
||||
continue;
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user