diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-06-21 16:03:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-21 16:03:19 +0200 |
commit | 34224d5ce55cd22ca8c627f79413f71f957af800 (patch) | |
tree | 61424995d8c410121d8fdb2795c4cea2e12efb17 | |
parent | f854088292ab1b8f4cc6b8052a5a53a39760a525 (diff) | |
parent | b3fe249e946a85ca64f344d2dd7de6f07666bfe3 (diff) |
Merge pull request #29958 from akien-mga/keep-calm-and-do-particles
Particles: Fix uninitialized angular velocity, fix inconsistency in linear velocity between CPU and GPU Particles
-rw-r--r-- | scene/2d/cpu_particles_2d.cpp | 4 | ||||
-rw-r--r-- | scene/3d/cpu_particles.cpp | 3 | ||||
-rw-r--r-- | scene/resources/particles_material.cpp | 1 |
3 files changed, 5 insertions, 3 deletions
diff --git a/scene/2d/cpu_particles_2d.cpp b/scene/2d/cpu_particles_2d.cpp index a8d72bb774..2396faa84b 100644 --- a/scene/2d/cpu_particles_2d.cpp +++ b/scene/2d/cpu_particles_2d.cpp @@ -1391,10 +1391,10 @@ CPUParticles2D::CPUParticles2D() { set_spread(45); set_flatness(0); - set_param(PARAM_INITIAL_LINEAR_VELOCITY, 1); + set_param(PARAM_INITIAL_LINEAR_VELOCITY, 0); + set_param(PARAM_ANGULAR_VELOCITY, 0); set_param(PARAM_ORBIT_VELOCITY, 0); set_param(PARAM_LINEAR_ACCEL, 0); - set_param(PARAM_ANGULAR_VELOCITY, 0); set_param(PARAM_RADIAL_ACCEL, 0); set_param(PARAM_TANGENTIAL_ACCEL, 0); set_param(PARAM_DAMPING, 0); diff --git a/scene/3d/cpu_particles.cpp b/scene/3d/cpu_particles.cpp index cff147ba74..6dc1b93576 100644 --- a/scene/3d/cpu_particles.cpp +++ b/scene/3d/cpu_particles.cpp @@ -1459,7 +1459,8 @@ CPUParticles::CPUParticles() { set_spread(45); set_flatness(0); - set_param(PARAM_INITIAL_LINEAR_VELOCITY, 1); + set_param(PARAM_INITIAL_LINEAR_VELOCITY, 0); + set_param(PARAM_ANGULAR_VELOCITY, 0); set_param(PARAM_ORBIT_VELOCITY, 0); set_param(PARAM_LINEAR_ACCEL, 0); set_param(PARAM_RADIAL_ACCEL, 0); diff --git a/scene/resources/particles_material.cpp b/scene/resources/particles_material.cpp index 758475b75e..a80a57a09c 100644 --- a/scene/resources/particles_material.cpp +++ b/scene/resources/particles_material.cpp @@ -1202,6 +1202,7 @@ ParticlesMaterial::ParticlesMaterial() : set_spread(45); set_flatness(0); set_param(PARAM_INITIAL_LINEAR_VELOCITY, 0); + set_param(PARAM_ANGULAR_VELOCITY, 0); set_param(PARAM_ORBIT_VELOCITY, 0); set_param(PARAM_LINEAR_ACCEL, 0); set_param(PARAM_RADIAL_ACCEL, 0); |