diff options
author | Colin Redman <20376935+credman0@users.noreply.github.com> | 2019-05-04 10:08:49 -0700 |
---|---|---|
committer | Colin Redman <20376935+credman0@users.noreply.github.com> | 2019-05-04 17:09:33 -0700 |
commit | 359d7f178c9c64365355db10fa41492c903558b9 (patch) | |
tree | 8e9fdc333e072a79ed78229da626bed6d968e0c0 /scene | |
parent | 84401e8cdf4f41fc0e804bf5410622e75a08c0f5 (diff) |
Fix ParallaxBackground breaking when moving it out the scene tree
Diffstat (limited to 'scene')
-rw-r--r-- | scene/2d/parallax_layer.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scene/2d/parallax_layer.cpp b/scene/2d/parallax_layer.cpp index baf5b5967b..9a6b63b9a3 100644 --- a/scene/2d/parallax_layer.cpp +++ b/scene/2d/parallax_layer.cpp @@ -105,6 +105,11 @@ void ParallaxLayer::_notification(int p_what) { orig_scale = get_scale(); _update_mirroring(); } break; + case NOTIFICATION_EXIT_TREE: { + + set_position(orig_offset); + set_scale(orig_scale); + } break; } } |