natiny_particles_set_align

C
void natiny_particles_set_align(NatinyParticles particles, uint32_t align);

Sets which way each particle quad faces.

Parameters

Name Type Description
particles NatinyParticles Particle system handle from natiny_particles_create
align uint32_t One of the alignment constants below

Constants

Constant Value A particle
NATINY_PARTICLES_ALIGN_BILLBOARD 0 Faces the camera and turns about the view axis - the default
NATINY_PARTICLES_ALIGN_STRETCHED 1 Faces the camera and stretches along its velocity; see set_stretch
NATINY_PARTICLES_ALIGN_HORIZONTAL 2 Lies flat, facing +Y, and turns about it
NATINY_PARTICLES_ALIGN_VERTICAL 3 Stands upright and turns about Y to face the camera
NATINY_PARTICLES_ALIGN_LOCAL 4 Lies in the emitter's own XY plane and turns about its Z

Example

C
natiny_particles_set_align(rain, NATINY_PARTICLES_ALIGN_STRETCHED);