Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

Change default curve range for particle angles to [-1, 1]

Gustaf Högberg227b015974de
diff --git a/scene/2d/cpu_particles_2d.cpp b/scene/2d/cpu_particles_2d.cpp
index bdd22977b60..caab01bfd65 100644
--- a/scene/2d/cpu_particles_2d.cpp
+++ b/scene/2d/cpu_particles_2d.cpp
@@ -423,7 +423,7 @@ void CPUParticles2D::set_param_curve(Parameter p_param, const Ref<Curve> &p_curv
_adjust_curve_range(p_curve, 0, 100);
} break;
case PARAM_ANGLE: {
- _adjust_curve_range(p_curve, -360, 360);
+ _adjust_curve_range(p_curve, -1, 1);
} break;
case PARAM_SCALE: {
} break;
diff --git a/scene/3d/cpu_particles_3d.cpp b/scene/3d/cpu_particles_3d.cpp
index f95af2e23f5..d057a843bd5 100644
--- a/scene/3d/cpu_particles_3d.cpp
+++ b/scene/3d/cpu_particles_3d.cpp
@@ -362,7 +362,7 @@ void CPUParticles3D::set_param_curve(Parameter p_param, const Ref<Curve> &p_curv
_adjust_curve_range(p_curve, 0, 100);
} break;
case PARAM_ANGLE: {
- _adjust_curve_range(p_curve, -360, 360);
+ _adjust_curve_range(p_curve, -1, 1);
} break;
case PARAM_SCALE: {
} break;
diff --git a/scene/resources/particle_process_material.cpp b/scene/resources/particle_process_material.cpp
index 4a59f95b8ef..de5236ee903 100644
--- a/scene/resources/particle_process_material.cpp
+++ b/scene/resources/particle_process_material.cpp
@@ -1652,7 +1652,7 @@ void ParticleProcessMaterial::set_param_texture(Parameter p_param, const Ref<Tex
} break;
case PARAM_ANGLE: {
RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->angle_texture, tex_rid);
- _adjust_curve_range(p_texture, -360, 360);
+ _adjust_curve_range(p_texture, -1, 1);
} break;
case PARAM_SCALE: {
RenderingServer::get_singleton()->material_set_param(_get_material(), shader_names->scale_texture, tex_rid);