mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Correctly calculates gravity in particle systems
This commit is contained in:
parent
ccf08e98de
commit
ecfc303270
@ -252,7 +252,7 @@ class ParticleSystem extends Node {
|
||||
particle.dir += accel;
|
||||
} else if (gravity[0] != 0.0 || gravity[1] != 0) {
|
||||
// gravity
|
||||
Vector2 accel = gravity.scale(dt);
|
||||
Vector2 accel = new Vector2.copy(gravity).scale(dt);
|
||||
particle.dir += accel;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user