Skip to content

Components

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

FieldScript nameKindDefaultWhat it does
Kindkindone of Directional, Point, Surface, BuoyancyDirectionalWhich kind of push this zone applies: wind, a magnet, a conveyor belt, or water.
Accelerationaccelerationtwo numbers (x, y)(0, -600)Directional: acceleration applied inside the area, in units per second squared.
Max Speedmax_speednumber, at least 0, step 100Directional: 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.
Strengthstrengthnumber800Point: acceleration at the centre, in units per second squared. Negative shoves away instead of pulling in.
Fallofffalloffone of Constant, Linear, InverseSquareLinearPoint: how Strength weakens with distance.
Radiusradiusnumber, at least 0128Point: the distance over which Falloff is measured.
Surface Speedsurface_speednumber120Surface: belt speed along the node's own +X direction, in units per second. Negative runs it the other way.
Gripgripnumber, at least 010Surface: how much of the gap between the body's speed and the belt's is closed each second.
Waterlinewaterlinenumber0Buoyancy: the water's top, in local units below the node's origin.
Densitydensitynumber, at least 0, step 0.051.2Buoyancy: lift, as a multiple of the body's own gravity.
Dragdragnumber, at least 04Buoyancy: how much of a submerged body's velocity is bled off each second.
Priorityprioritynumber0Which zone wins where two overlap.
EnabledenabledcheckboxonWhether it is pushing right now.