1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-30 16:26:50 +00:00

Fix Parallax2D repeats being not relative to its transform

(cherry picked from commit 1bd8372813)
This commit is contained in:
kleonc
2024-08-18 19:36:08 +02:00
committed by Rémi Verschelde
parent 4168220169
commit f0f69a7b7c
9 changed files with 78 additions and 57 deletions

View File

@@ -78,13 +78,7 @@ void ParallaxLayer::_update_mirroring() {
}
void ParallaxLayer::set_mirroring(const Size2 &p_mirroring) {
mirroring = p_mirroring;
if (mirroring.x < 0) {
mirroring.x = 0;
}
if (mirroring.y < 0) {
mirroring.y = 0;
}
mirroring = p_mirroring.maxf(0);
_update_mirroring();
}