natiny.particles.set_align
Lua
natiny.particles.set_align(particles, align)
Sets which way each particle quad faces.
Parameters
| Name |
Type |
Description |
particles |
number |
Particle system handle from natiny.particles.create |
align |
integer |
One of the alignment constants below |
Constants
| Constant |
A particle |
natiny.particles.ALIGN_BILLBOARD |
Faces the camera and turns about the view axis - the default |
natiny.particles.ALIGN_STRETCHED |
Faces the camera and stretches along its velocity; see set_stretch |
natiny.particles.ALIGN_HORIZONTAL |
Lies flat, facing +Y, and turns about it |
natiny.particles.ALIGN_VERTICAL |
Stands upright and turns about Y to face the camera |
natiny.particles.ALIGN_LOCAL |
Lies in the emitter's own XY plane and turns about its Z |
Example
Lua
natiny.particles.set_align(rain, natiny.particles.ALIGN_STRETCHED)