Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPUParticles2D damping is limited to 100 #56324

Closed
hunterloftis opened this issue Dec 29, 2021 · 4 comments · Fixed by #73585
Closed

CPUParticles2D damping is limited to 100 #56324

hunterloftis opened this issue Dec 29, 2021 · 4 comments · Fixed by #73585

Comments

@hunterloftis
Copy link
Contributor

Godot version

Godot_v3.4.2-stable_x11

System information

Ubuntu desktop

Issue description

In the editor, the value for CPUParticles2D.damping is arbitrarily clamped to 100.0:

image

This can be hacked around by creating a damping curve that moves from zero immediately to the actual value you want (eg, 250):

image

It may also be hackable by setting the value in code (I haven't confirmed this).

Steps to reproduce

  • Create a CPUParticles2D node
  • Give it some high velocity that you want to dampen quickly (say, 1000)
  • Try to dampen it to 300
  • See that you can't raise the value above 100

Minimal reproduction project

No response

@akien-mga
Copy link
Member

This can be solved by adding ,or_greater in the property hint to keep 100 as max for the slider but still allow manual input to go above. This was done for (GPU) ParticlesMaterial but not CPUParticles and CPUParticles2D:

scene/3d/cpu_particles.cpp
1479:   ADD_PROPERTYI(PropertyInfo(Variant::REAL, "damping", PROPERTY_HINT_RANGE, "0,100,0.01"), "set_param", "get_param", PARAM_DAMPING);

scene/2d/cpu_particles_2d.cpp
1339:   ADD_PROPERTYI(PropertyInfo(Variant::REAL, "damping", PROPERTY_HINT_RANGE, "0,100,0.01"), "set_param", "get_param", PARAM_DAMPING);

scene/resources/particles_material.cpp
55:     shader_names->damping = "damping";
1302:   ADD_PROPERTYI(PropertyInfo(Variant::REAL, "damping", PROPERTY_HINT_RANGE, "0,100,0.01,or_greater"), "set_param", "get_param", PARAM_DAMPING);

It can be relevant to check if other parameters of ParticlesMaterial have ,or_greater without it being present in the equivalent of CPUParticles*.

@albinaask
Copy link
Contributor

I'll give it a try.

akien-mga pushed a commit that referenced this issue Jan 13, 2022
fix to #56324

Note: CPU_Particles_2d is missing ring emitter
@clayjohn
Copy link
Member

clayjohn commented Jan 13, 2022

Closed by #56748

Ah, we still need this for master

@clayjohn clayjohn reopened this Jan 13, 2022
@clayjohn clayjohn added this to the 4.0 milestone Jan 13, 2022
@albinaask
Copy link
Contributor

Hi, There seem to be one damping_min and one damping_max parameter, which one should be marked as "or_greater", I guess the damping_max?

akien-mga pushed a commit to akien-mga/godot that referenced this issue Jan 25, 2022
fix to godotengine#56324

Note: CPU_Particles_2d is missing ring emitter
(cherry picked from commit 21ca1c9)
@KoBeWi KoBeWi moved this to To Assess in 4.x Priority Issues May 11, 2022
@KoBeWi KoBeWi moved this from To Assess to In Progress in 4.x Priority Issues May 11, 2022
@clayjohn clayjohn modified the milestones: 4.0, 4.x Jan 12, 2023
YuriSizov pushed a commit to YuriSizov/godot that referenced this issue Feb 19, 2023
Issue godotengine#56324 notes that you may can't set the damping property of
CPUParticles2D to anything more that 100 in the editor inspector
while you may set it to anything in code, this is considered a bug and
changed in this commit
@akien-mga akien-mga modified the milestones: 4.x, 4.0 Feb 19, 2023
JeffVenancius pushed a commit to JeffVenancius/godot that referenced this issue Mar 3, 2023
Issue godotengine#56324 notes that you may can't set the damping property of
CPUParticles2D to anything more that 100 in the editor inspector
while you may set it to anything in code, this is considered a bug and
changed in this commit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment