summaryrefslogtreecommitdiff
path: root/scene/3d
diff options
context:
space:
mode:
Diffstat (limited to 'scene/3d')
-rw-r--r--scene/3d/particles.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/scene/3d/particles.cpp b/scene/3d/particles.cpp
index 241eb7d1ca..06b5613eb8 100644
--- a/scene/3d/particles.cpp
+++ b/scene/3d/particles.cpp
@@ -331,6 +331,13 @@ void Particles::_notification(int p_what) {
set_process_internal(false);
}
}
+
+ if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
+ // make sure particles are updated before rendering occurs if they were active before
+ if (is_visible_in_tree() && !VS::get_singleton()->particles_is_inactive(particles)) {
+ VS::get_singleton()->particles_request_process(particles);
+ }
+ }
}
void Particles::_bind_methods() {