Skip to content

PushEffect ​

Inherits: MoveDirectionalEffect < CompositeEffect < Effect < DatabaseResource < Resource

PushEffect: Physics impulse away from originator position Perfect for explosion knockbacks, force push abilities, and impact effects

Properties ​

floatinitial_force10.0
floatupward_force0.0
floatmovement_duration1.0
floatfriction_coefficient0.9

Methods ​

voidapply_movement( effect_instance: EffectInstance, entity: Entity, direction: Vector3 )
voidhandle_movement_collision( effect_instance: EffectInstance, collision: KinematicCollision3D )
Stringget_effect_description()
Stringget_editor_description()

Property descriptions ​

Push Settings

float initial_force = 10.0 ​

Initial velocity burst strength pushing away from originator

float upward_force = 0.0 ​

Additional upward force component (0.0 = no upward push)

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)

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.

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.