natiny_particles_set_gravity
void natiny_particles_set_gravity(NatinyParticles particles, float x, float y, float z);
Sets a constant acceleration applied to every particle.
Parameters
| Name | Type | Description |
|---|---|---|
particles |
NatinyParticles |
Particle system handle from natiny_particles_create |
x |
float |
X of the acceleration, in units per second squared |
y |
float |
Y of the acceleration |
z |
float |
Z of the acceleration |
Example
natiny_particles_set_gravity(sparks, 0.0f, -9.8f, 0.0f);