Instantiating node outside of viewport

Godot Version

4.2.2.stable

Question

So I’m currently working on a project where the enemies spawn outside of the viewport and the player can kill the enemy whether it’s inside or outside the viewport. When the enemy dies it instantiates a node which contains an explosion of gpuparticle2d. Now the problem is, when I kill the enemy within the viewport it works just fine but whenever I kill it when it’s outside the viewport the explosion doesn’t happens instantly!
So my main question is how can I modify my explosion containing node to emit the explosion particle even if it’s outside of the viewport.

Sorry for my bad English:(

I think you can get what you want if you change the Visibility Rect param, in your GPUParticles2D, in the Drawing section

Source:

Grow the rect if particles suddenly appear/disappear when the node enters/exits the screen.

1 Like

Thank you so much, it really worked.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.