Create a curve to pass as an attribute to an effect.
Parameter
Type
Meaning
num_points
int
The number of control points in the curve.
order
int
The number of dimensions the curve has. Valid range is 1-4.
t_scale
var
Controls the scale of the x axis. Default of 0 means the curve goes from 0-1. Greater than 0 means the points are evenly distributed between 0 and t_scale. Less than 0 means each control point will define it's own x value. A vec2 means the x axis is evenly distributed between t_scale.x and t_scale.y.
interpolation
float
Controls how the curve interpolates between points. Unspecified or less than 0 means use the effect setting, 0 is linear, other values greater than 0 scale the length of the tangents for cubic hermite spline interpolation (1.0 is Catmull-Rom).
allow_interpolation_loop
bool
Controls if the curve should calculate tangents smoothly through the first and last points when they are equal.
Particle effect will emit new particles when state_number is greater than 0, and restart when state_number is greater than max state_number encountered previously
loop
bool
Whether the effect should be looped.
transform
Component
Reference a transform component that positions the effect.
priority
float
Relative priority of the effect.
fill_limited
bool
If true, the effect is generally GPU fill rate limited. Only a small number of such effects are allowed active at once.
camera_mask
int
Which (split-screen) cameras should draw this emitter.
attributes
list
List of attribute values to set.
attributes_counter
int
A counter that should be updated whenever the attributes are changed to mark them as dirty.
scene
Component
The scene component, e.g. entity.get_hierarchy_singleton(type: 'scene.vscript').
Sets a point inside a curve attribute using the vector in value or x, y, z and w.
Parameter
Type
Meaning
curve
Reference
The curve to modify.
index
int
The index of the point to set.
t
float
The t value for this point, only required and used when the curve was created with t_scale less that 0.
value
var
Vector representing the value for the point. Should be at least the same size as the curve's order, if it's bigger the extra values are ignored. For order 4 curves, a vec3 can be used here with w set to the last value.