Strange unexpected GPUParticles2D behaviour when going offscreen

Godot Version

Godot_v4.3-stable_mono_win64

Question

Something strange is happening with GPUParticles2D when they’re going off-screen, could somebody help me to understand? Should I report this as an issue or it’s expected behavior?
I’m not fan of this because in my actual game I have quite a few GPUParticles2D nodes going off-screen all the time and when camera reaches them sometimes they appear to be in the wrong place.
Issue seems to be related to local coords being off, but that’s exactly what I need to make them look right in my game.

The video of this happening: 2025-01-08 19-50-21.mkv - Google Drive
The project: 2d-offscreen-particles-strange-behavior.zip - Google Drive

You need a much larger visibility rect, the blue square around your GPUparticles shows it’s on-screen bounds which determine if it’s processing or not.

I mean how large we’re talking about, currently I set it to x: -1000, y: -1000, w: 2000, h: 2000 so it’s 2000x2000, and it’s still not enough if I make my camera move faster. So do I just keep increasing it until it’s not happening?

I don’t think they appear in the wrong place, they just start rendering when they become visible in the viewport.

By default, GPUParticles2D, don’t render when it’s not visible in the viewport for performance reasons.

Like the previous comment, you can increase the visibility rect and make sure the particle is at the center of the visibility rect so when the visibility rect becomes visible to the camera, the particles will start playing before you actually see it on screen.

Another thing you can try is to preprocess the GpuParticle2D for a couple of seconds to make it looks as if it has been running once it enters the screen.

I hope any of these solutions work for you.

1 Like

Yeah, I didn’t mean it exactly them spawning in the wrong place, but like that didn’t look right. So I think I kinda get it now, by my understanding what is happening is once camera goes far enough depending on the visibility rect they stop processing so particles freeze but emitter still moves so the end result is that when you return the particles start processing again and if it doesn’t have enough time to process you will see some leftover particles in their previous position from before emitter moved away while they were not processing.
Anyway making visibility rect very very large does resolve the issue. Thank you all.