Effector
A force zone placed alongside an Area: wind down a shaft, a magnet's pull, a conveyor's speed, or the lift and drag of water. It only acts on bodies inside that Area.
On this page
Add it
+ Add node → Effector creates a node with it already on. Already have a node for it? Add component → EffectorComponent.
From a script
A script on the same node writes these fields by name. EffectorComponent is the name to pass.
rgs
set_point("EffectorComponent", "acceleration", vec2(0.0, -600.0));
set_number("EffectorComponent", "max_speed", 0.0);
set_number("EffectorComponent", "strength", 800.0);
set_number("EffectorComponent", "radius", 128.0);
set_number("EffectorComponent", "surface_speed", 120.0);
set_number("EffectorComponent", "grip", 10.0);
set_number("EffectorComponent", "waterline", 0.0);
set_number("EffectorComponent", "density", 1.2);
set_number("EffectorComponent", "drag", 4.0);
set_flag("EffectorComponent", "enabled", true); Fields
| Field | Script name | Kind | Default | What it does |
|---|---|---|---|---|
| Kind | kind | one of Directional, Point, Surface, Buoyancy | Directional | Which kind of push this zone applies: wind, a magnet, a conveyor belt, or water. |
| Acceleration | acceleration | two numbers (x, y) | (0, -600) | Directional: acceleration applied inside the area, in units per second squared. |
| Max Speed | max_speed | number, at least 0, step 10 | 0 | Directional: the fastest it blows a body along its Acceleration, in units per second; it stops pushing one already that fast that way, and never slows one. 0 is no limit. |
| Strength | strength | number | 800 | Point: acceleration at the centre, in units per second squared. Negative shoves away instead of pulling in. |
| Falloff | falloff | one of Constant, Linear, InverseSquare | Linear | Point: how Strength weakens with distance. |
| Radius | radius | number, at least 0 | 128 | Point: the distance over which Falloff is measured. |
| Surface Speed | surface_speed | number | 120 | Surface: belt speed along the node's own +X direction, in units per second. Negative runs it the other way. |
| Grip | grip | number, at least 0 | 10 | Surface: how much of the gap between the body's speed and the belt's is closed each second. |
| Waterline | waterline | number | 0 | Buoyancy: the water's top, in local units below the node's origin. |
| Density | density | number, at least 0, step 0.05 | 1.2 | Buoyancy: lift, as a multiple of the body's own gravity. |
| Drag | drag | number, at least 0 | 4 | Buoyancy: how much of a submerged body's velocity is bled off each second. |
| Priority | priority | number | 0 | Which zone wins where two overlap. |
| Enabled | enabled | checkbox | on | Whether it is pushing right now. |