summaryrefslogtreecommitdiff
path: root/scene/3d/cpu_particles.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/3d/cpu_particles.cpp')
-rw-r--r--scene/3d/cpu_particles.cpp4
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);