diff options
author | clayjohn <claynjohn@gmail.com> | 2019-09-24 07:56:50 -0700 |
---|---|---|
committer | clayjohn <claynjohn@gmail.com> | 2019-09-24 08:03:53 -0700 |
commit | bc94203addfddfab386878125d98c52765d489ad (patch) | |
tree | 39afc99ea4209b73d3e883cf9dd1c7e1d6138923 /scene/3d | |
parent | a1fcac640061c45e9dc55b1189e82aed3e2672fb (diff) |
fix particles scale randomization
Diffstat (limited to 'scene/3d')
-rw-r--r-- | scene/3d/cpu_particles.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/3d/cpu_particles.cpp b/scene/3d/cpu_particles.cpp index fc16bc36cb..4cb94225b4 100644 --- a/scene/3d/cpu_particles.cpp +++ b/scene/3d/cpu_particles.cpp @@ -915,8 +915,8 @@ void CPUParticles::_particles_process(float p_delta) { } //scale by scale - float base_scale = Math::lerp(parameters[PARAM_SCALE] * tex_scale, 1.0f, p.scale_rand * randomness[PARAM_SCALE]); - if (base_scale == 0.0) base_scale = 0.000001; + float base_scale = tex_scale * Math::lerp(parameters[PARAM_SCALE], 1.0f, p.scale_rand * randomness[PARAM_SCALE]); + if (base_scale < 0.000001) base_scale = 0.000001; p.transform.basis.scale(Vector3(1, 1, 1) * base_scale); |