summaryrefslogtreecommitdiff
path: root/scene/resources
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2018-09-04 15:35:11 +0200
committerRémi Verschelde <rverschelde@gmail.com>2018-09-04 15:35:11 +0200
commit13c3b9e59b6370f4c876d2cb7182714f0cf05b03 (patch)
tree24a303af5e433cce48c09803923ad7ae7f8faed2 /scene/resources
parente8a6c5844ad7d8b0a1000b4173738e3e93f2a11e (diff)
Particles: Reset default velocity to 0, allow negative values
Diffstat (limited to 'scene/resources')
-rw-r--r--scene/resources/particles_material.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/resources/particles_material.cpp b/scene/resources/particles_material.cpp
index 218a4cefe7..364ec9bb19 100644
--- a/scene/resources/particles_material.cpp
+++ b/scene/resources/particles_material.cpp
@@ -1123,7 +1123,7 @@ void ParticlesMaterial::_bind_methods() {
ADD_GROUP("Gravity", "");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "gravity"), "set_gravity", "get_gravity");
ADD_GROUP("Initial Velocity", "initial_");
- ADD_PROPERTYI(PropertyInfo(Variant::REAL, "initial_velocity", PROPERTY_HINT_RANGE, "0,1000,0.01,or_greater"), "set_param", "get_param", PARAM_INITIAL_LINEAR_VELOCITY);
+ ADD_PROPERTYI(PropertyInfo(Variant::REAL, "initial_velocity", PROPERTY_HINT_RANGE, "0,1000,0.01,or_lesser,or_greater"), "set_param", "get_param", PARAM_INITIAL_LINEAR_VELOCITY);
ADD_PROPERTYI(PropertyInfo(Variant::REAL, "initial_velocity_random", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_param_randomness", "get_param_randomness", PARAM_INITIAL_LINEAR_VELOCITY);
ADD_GROUP("Angular Velocity", "angular_");
ADD_PROPERTYI(PropertyInfo(Variant::REAL, "angular_velocity", PROPERTY_HINT_RANGE, "-360,360,0.01"), "set_param", "get_param", PARAM_ANGULAR_VELOCITY);
@@ -1204,7 +1204,7 @@ ParticlesMaterial::ParticlesMaterial() :
set_spread(45);
set_flatness(0);
- set_param(PARAM_INITIAL_LINEAR_VELOCITY, 1);
+ set_param(PARAM_INITIAL_LINEAR_VELOCITY, 0);
set_param(PARAM_ORBIT_VELOCITY, 0);
set_param(PARAM_LINEAR_ACCEL, 0);
set_param(PARAM_RADIAL_ACCEL, 0);