Commit 7f60546
committed
Fix CPUParticles2D repeatedly scaling particles with 0 velocity and Align Y
CPUParticles2D with Align Y turned on would update particles' transforms based on the velocity when velocity was non-zero, but would not set the transform for zero velocity. This left the transfrom value from the previous call, which may have already been scaled. In this case, each call to _particles_process would apply the scale again, causing the particle to repeatedly grow (or shrink for scales < 1.0).
Updated the Align Y logic to always normalize the transform values before scale is applied.1 parent 4d1f26e commit 7f60546
1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1097 | 1097 | | |
1098 | 1098 | | |
1099 | 1099 | | |
1100 | | - | |
1101 | | - | |
| 1100 | + | |
1102 | 1101 | | |
1103 | 1102 | | |
| 1103 | + | |
| 1104 | + | |
1104 | 1105 | | |
1105 | 1106 | | |
1106 | 1107 | | |
| |||
0 commit comments