PullEffect ​
Inherits: MoveDirectionalEffect < CompositeEffect < Effect < DatabaseResource < Resource
PullEffect: Physics impulse toward originator position Perfect for force pull abilities, magnetic effects, and grappling hooks
Properties ​
float | initial_force | 10.0 |
float | upward_force | 0.0 |
float | movement_duration | 1.0 |
float | friction_coefficient | 0.9 |
bool | stop_at_originator | true |
float | stop_distance | 1.0 |
Methods ​
void | apply_movement( effect_instance: EffectInstance, entity: Entity, direction: Vector3 ) |
void | handle_movement_collision( effect_instance: EffectInstance, collision: KinematicCollision3D ) |
void | on_movement_timer_finished( effect_instance: EffectInstance ) |
String | get_effect_description() |
String | get_editor_description() |
Property descriptions ​
Pull Settings
float initial_force = 10.0 ​
Initial velocity burst strength pulling toward originator
float upward_force = 0.0 ​
Additional upward force component (0.0 = no upward pull)
float movement_duration = 1.0 ​
How long the displacement effect lasts
float friction_coefficient = 0.9 ​
How quickly displacement decays each frame (0.8 = fast decay, 0.95 = slow decay)
bool stop_at_originator = true ​
Whether to stop when reaching the originator (prevents overshooting)
float stop_distance = 1.0 ​
Distance from originator where movement stops (if stop_at_originator is true)
Method descriptions ​
void apply_movement( effect_instance: EffectInstance, entity: Entity, direction: Vector3 ) ​
Moves the entity one step in the direction of the movement.
void handle_movement_collision( effect_instance: EffectInstance, collision: KinematicCollision3D ) ​
Called when the moving entity hits something: it bounces or stops, by the settings of the effect.
void on_movement_timer_finished( effect_instance: EffectInstance ) ​
Called when the time of the movement is over.
String get_effect_description() ​
The text of the effect for tooltips, with its values filled in.
String get_editor_description() ​
A short text for the effect editor that says what the effect does.