summaryrefslogtreecommitdiffstats
path: root/scene/3d/particles.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-06-28 17:00:18 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-06-28 17:01:35 -0300
commitdb3b05d2893dcaddeb3bcb10b845ff150eb50895 (patch)
treee19d761357300ba03360593e3cbdda01e87f215e /scene/3d/particles.cpp
parent9e54e1f34f7ee0b100b45fa2388f25096eb90670 (diff)
downloadredot-engine-db3b05d2893dcaddeb3bcb10b845ff150eb50895.tar.gz
Reworked translation system
-Label and Button reload translation on the fly -Resources are loaded and reload depending on locale
Diffstat (limited to 'scene/3d/particles.cpp')
-rw-r--r--scene/3d/particles.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/3d/particles.cpp b/scene/3d/particles.cpp
index edf97bc248..c8f45a8d7e 100644
--- a/scene/3d/particles.cpp
+++ b/scene/3d/particles.cpp
@@ -627,7 +627,7 @@ void ParticlesMaterial::_update_shader() {
if (flags[FLAG_DISABLE_Z]) {
- code += " float angle1 = rand_from_seed(alt_seed)*spread*3.1416;\n";
+ code += " float angle1 = (rand_from_seed(alt_seed)*2.0-1.0)*spread/180.0*3.1416;\n";
code += " vec3 rot=vec3( cos(angle1), sin(angle1),0.0 );\n";
code += " VELOCITY=(rot*initial_linear_velocity+rot*initial_linear_velocity_random*rand_from_seed(alt_seed));\n";