GPU Particles
self:set_trail
ClientDraws a ribbon trail behind each particle instead of a quad
Syntax
local status = self:set_trail(
state,
lifetime = 0.3
)Keep the trail lifetime below the particle lifetime.
- Trails reach far from the emitter — raise
self:set_visibility_aabbso they are not culled.
Parameters
| Type | Name | Description |
|---|---|---|
bool | state | true to draw trails, false to go back to quads |
float | lifetime | How long the trail stays behind each particle in seconds, at least 0.01 |
Returns
| Type | Name | Description |
|---|---|---|
bool | status | true on successful execution, false otherwise |
Examples
local entity = particle.gpu.create()
entity:set_trail(true, 0.8)
entity:set_blend_mode(particle.gpu.blend_mode.ADD)local entity = particle.gpu.create()
entity:set_trail(true)
entity:set_trail(false)