mirror of
https://github.com/Heretek-AI/GDevelop.git
synced 2026-07-21 01:25:32 -04:00
Fix particle emitter gravity length action when it was 0 (#8520)
This commit is contained in:
@@ -847,8 +847,13 @@ namespace gdjs {
|
||||
const oldLength = this.getParticleGravityLength();
|
||||
if (oldLength !== length) {
|
||||
this._gravityDirty = true;
|
||||
this.gravityX *= length / oldLength;
|
||||
this.gravityY *= length / oldLength;
|
||||
if (oldLength === 0) {
|
||||
this.gravityX = 0;
|
||||
this.gravityY = length;
|
||||
} else {
|
||||
this.gravityX *= length / oldLength;
|
||||
this.gravityY *= length / oldLength;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user