GPU Particles

self:set_turbulence

Client

Sets whether turbulence is applied to the particles

Syntax

local status = self:set_turbulence(
    state,
    strength = 1,
    scale = 1.5
)

Parameters

TypeNameDescription
boolstatetrue to enable turbulence, false to disable it
floatstrengthHow strongly particles are pushed around
Left unchanged when omitted
floatscaleSize of the turbulence noise
Left unchanged when omitted

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Add swirl to the particles
local entity = particle.gpu.create()

entity:set_turbulence(true, 0.8, 2)
Disable turbulence
local entity = particle.gpu.create()

entity:set_turbulence(false)

On this page