natiny.particles.set_gravity
natiny.particles.set_gravity(particles, x, y [, z])
Sets a constant acceleration applied to every particle.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
particles |
number |
Particle system handle from natiny.particles.create |
|
x |
number |
X of the acceleration, in units per second squared | |
y |
number |
Y of the acceleration | |
z |
number |
0 |
Z of the acceleration |
Example
natiny.particles.set_gravity(sparks, 0, -9.8, 0)