diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-12-02 10:14:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-02 10:14:26 +0100 |
commit | bb3f0a9d583f2235c9982a5028f3885bc7c1d6a0 (patch) | |
tree | 5bcd822f580935b4d963765849ad06d28befa098 /scene/2d/cpu_particles_2d.cpp | |
parent | 1398436ab882416379e785b993c6c7395e218a34 (diff) | |
parent | 459e2a4b6f45b19f50e8a493e12e0f442a14a826 (diff) |
Merge pull request #55271 from RPicster/particles-texture-animation-speed
Diffstat (limited to 'scene/2d/cpu_particles_2d.cpp')
-rw-r--r-- | scene/2d/cpu_particles_2d.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/2d/cpu_particles_2d.cpp b/scene/2d/cpu_particles_2d.cpp index 80c17b6e88..8d997bb1f5 100644 --- a/scene/2d/cpu_particles_2d.cpp +++ b/scene/2d/cpu_particles_2d.cpp @@ -890,7 +890,7 @@ void CPUParticles2D::_particles_process(double p_delta) { real_t base_angle = (tex_angle)*Math::lerp(parameters_min[PARAM_ANGLE], parameters_max[PARAM_ANGLE], p.angle_rand); base_angle += p.custom[1] * lifetime * tex_angular_velocity * Math::lerp(parameters_min[PARAM_ANGULAR_VELOCITY], parameters_max[PARAM_ANGULAR_VELOCITY], rand_from_seed(alt_seed)); p.rotation = Math::deg2rad(base_angle); //angle - p.custom[2] = tex_anim_offset * Math::lerp(parameters_min[PARAM_ANIM_OFFSET], parameters_max[PARAM_ANIM_OFFSET], p.anim_offset_rand) + p.custom[1] * tex_anim_speed * Math::lerp(parameters_min[PARAM_ANIM_SPEED], parameters_max[PARAM_ANIM_SPEED], rand_from_seed(alt_seed)); + p.custom[2] = tex_anim_offset * Math::lerp(parameters_min[PARAM_ANIM_OFFSET], parameters_max[PARAM_ANIM_OFFSET], p.anim_offset_rand) + tv * tex_anim_speed * Math::lerp(parameters_min[PARAM_ANIM_SPEED], parameters_max[PARAM_ANIM_SPEED], rand_from_seed(alt_seed)); } //apply color //apply hue rotation |