diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-05-05 15:44:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-05 15:44:50 +0200 |
commit | 5128430700f3f9751e422ce7fd9fcc4f5eeae553 (patch) | |
tree | f664340c1efcb7feeaae0f573d90aa31ee481d8a | |
parent | dcf8b0bbe474ad4bae80a71802a9a8298146b8e3 (diff) | |
parent | 359d7f178c9c64365355db10fa41492c903558b9 (diff) |
Merge pull request #28684 from credman0/master
Fix ParallaxBackground breaking when moving it out the scene tree
-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; } } |