The effect
namespace contains all effect-related functions and variables.
Return type | Description |
bool | effect.isRunning() Returns true if the parent effect instance is still running, false if it has stopped.This can be used to detect when the effect is stopped, and kill infinite particles, or gracefully fade them out. |
bool | effect.isRenderingEnabled() [v2.7.0]Returns true if the parent effect instance has rendering enabled, false if it was explicitly hidden.This can be used to detect when the parent effect instance has been explicitly hidden by the game engine. It is automatically bound to each renderer’s Enabled pin.Note that this does not represent when an effect is culled by the view frustum or LOD system, it is a separate “show/hide” mechanism. |
bool | effect.isTeleporting() [v2.7.0]Returns true if the parent effect instance has been teleported this frame.This can be used to shutdown distance-based trail emission or other things sensitive to very large distances travelled in a single frame. |
Time
Return type | Description |
float | effect.age() Returns the age of the parent effect instance, in seconds. |
float | effect.dt() [v2.7.0]Simulation timestep as experienced by the parent effect instance. Equals to scene.dt, unless the effect instance has a time-scale factor (time-dilation) different from 1.0 effect.dt() = scene.dt * effect.timeScale(); |
float | effect.timeScale() [v2.7.0]Time-scale factor applied to the parent effect instance. By default, equal to 1.0 . |
Transforms
Return type | Description |
float3 | effect.position() Returns the position of the parent effect instance, in worldspace. |
float3 | effect.velocity() Returns the velocity of the parent effect instance, in worldspace. |
orientation | effect.orientation() Returns the orientation of the parent effect instance, in worldspace. |
float3 | effect.scale() Returns the scale of the parent effect instance, in worldspace. |
float3 | effect.axisSide() Returns the side axis of the parent effect instance (left / right), in worldspace. |
float3 | effect.axisVertical() Returns the vertical axis of the parent effect instance (down / up), in worldspace. |
float3 | effect.axisDepth() Returns the depth axis of the parent effect instance (backward / forward), in worldspace. |
float3 | effect.axisLeft() Returns the left axis direction of the parent effect instance, in worldspace. |
float3 | effect.axisRight() Returns the right axis direction of the parent effect instance, in worldspace. |
float3 | effect.axisDown() Returns the down axis direction of the parent effect instance, in worldspace. |
float3 | effect.axisUp() Returns the up axis direction of the parent effect instance, in worldspace. |
float3 | effect.axisBackward() Returns the backward axis direction of the parent effect instance, in worldspace. |
float3 | effect.axisForward() Returns the forward axis direction of the parent effect instance, in worldspace. |
LOD
Return type | Description |
float | effect.lodBias() LOD bias of the current effect instance. This value is in the [-1, 1] range. |