GPU Particles
self:set_emission_shape
ClientSets the shape particles are emitted from
Syntax
local status = self:set_emission_shape(
shape,
radius = 1,
inner_radius = 0,
height = 1
)Parameters
| Type | Name | Description |
|---|---|---|
particle.gpu.emission_shape | shape | Emission shape to apply |
float | vector3 | radius | Size of the shape, depending on shape:• SPHERE / SPHERE_SURFACE - radius as a float• BOX - extents as {x, y, z}• RING - radius as a float |
float | inner_radius | Inner radius of the ring, only used by RING |
float | height | Height of the ring, only used by RING |
Returns
| Type | Name | Description |
|---|---|---|
bool | status | true on successful execution, false otherwise |
Examples
local entity = particle.gpu.create()
entity:set_emission_shape(particle.gpu.emission_shape.SPHERE, 0.5)local entity = particle.gpu.create()
entity:set_emission_shape(particle.gpu.emission_shape.BOX, {1, 0.5, 1})local entity = particle.gpu.create()
entity:set_emission_shape(particle.gpu.emission_shape.RING, 2, 1.5, 0.2)