Browse Source

Merge pull request #25207 from clayjohn/cpu_particle_2d_aligny_bug

Fix bug with CpuParticles2D AlignY
Rémi Verschelde 6 years ago
parent
commit
7c8f55f857
1 changed files with 1 additions and 1 deletions
  1. 1 1
      scene/2d/cpu_particles_2d.cpp

+ 1 - 1
scene/2d/cpu_particles_2d.cpp

@@ -840,7 +840,7 @@ void CPUParticles2D::_particles_process(float p_delta) {
 		if (flags[FLAG_ALIGN_Y_TO_VELOCITY]) {
 		if (flags[FLAG_ALIGN_Y_TO_VELOCITY]) {
 			if (p.velocity.length() > 0.0) {
 			if (p.velocity.length() > 0.0) {
 
 
-				p.transform.elements[0] = p.velocity.normalized();
+				p.transform.elements[1] = p.velocity.normalized();
 				p.transform.elements[0] = p.transform.elements[1].tangent();
 				p.transform.elements[0] = p.transform.elements[1].tangent();
 			}
 			}