0 votes

I saw this question a couple of times, but none of them were properly answered. So, I have a scene with effects node, where I attach all the one shot particles (e.g. explosions). They last few seconds, a new one is triggered every few seconds, old ones are dequeued and they seem to work perfectly... until I move camera to other part of the map and they're not visible. When I move back, they seem to stack and start playing all at once. Like they were all instanced, but then waited for me to see them. It's a very odd behavior to have by default.

So if anybody has an idea how to make it act "normal" = play when they are instanced, not when seen, I'd be glad to hear it.

asked Sep 23, 2019 in Engine by gmaps (696 points)

My guess is that because they are simulated on the GPU, if they are not drawn, then they are not simulated. This is quite lame tbh, but that's only a guess. I wonder if culling could be disabled on them (or could be given a large AABB to never be culled).

Does this happen with CPUParticles?

I got a similar answer on discord - make AABB cover all the map. I'll try it, but it doesn't sound good performance-wise. I was also thinking instead of increasing AABB to add a timer to the "explosion" scene which manages the particles so it dequeues after few seconds. The problem still persists with the explosions that are invisible, but we looked at them before timer passed - they would start late and dequeue too soon. But then I noticed there is a "preprocess" parameter. Maybe if I could somehow detect when camera sees the particle emitter and set that preprocess parameter in scene script to value of the seconds left, it would look seamless. I'll try changing AABB, adding timer and CPU particles and report which one is the winner.

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.