Spawn particle with random rotation

Godot Version

4.4

Question

I’m trying to spawn a GPUParticle3D with a random angle. The particle is just a 2D billboard that flashes for a brief moment, then scales down and disappears. It has no movement, just a scaling animation and nothing much else…My intention is for the particle to appear with a random rotation everytime it spawns.

So I’ve tried doing it by setting the material Billboard to Particle Billboard (even though the image is not animated, but I’m just using 1 HFrames/VFrames) as the docs say and then set the Angle property in Process Material->Spawn->Angle to different values, but it does nothing. Every time I change the min and max angles and then spawn the particle in the editor it changes rotation the first time, but all other times I spawn the particle it maintains the same rotation. It’s like instead of getting a random value between (angle_min, angle_max) every time a particle spawns, it just gets a random value for the first particle and then reuses it for all the others.

I also tried all combinations of particle_flag_disable_z and particle_flag_rotate_y like the docs suggest, but still get the same behavior.

I’m currently using 4.4beta4, but have seen the same behaviour since 4.2.

This seems to be a bug in the editor: When I spawn the particles in-game they behave as expected, with every new particle getting a new orientation on spawn.

It also works correctly in the editor if you un-check one-shot option and instead set the particle to emit constantly: In this case you can see how every particle is spawned with a different orientation.

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