Skip to content

DashEffect ​

Inherits: MoveDirectionalEffect < CompositeEffect < Effect < DatabaseResource < Resource

DashEffect: Distance-based movement (instant or smooth) Combines instant teleportation and smooth dashing into one flexible effect Perfect for blink step, phase dash, precise repositioning, and gap closers

Properties ​

floattarget_distance5.0
boolinstantfalse
floatmovement_duration0.15
boolcheck_for_collisionstrue
floatcollision_safety_offset0.5
floatdistance_tolerance0.1

Methods ​

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

Property descriptions ​

Teleport Settings

float target_distance = 5.0 ​

Exact distance to move in chosen direction

bool instant = false ​

If true: instant teleport, if false: smooth dash movement

float movement_duration = 0.15 ​

How long smooth movement takes (ignored if instant is true)

Collision Detection

bool check_for_collisions = true ​

Whether to check for obstacles along movement path

float collision_safety_offset = 0.5 ​

Distance to stop before collision point (prevents getting stuck in walls)

Precision Settings

float distance_tolerance = 0.1 ​

How close to target distance before snapping to exact position (smooth mode only)

Method descriptions ​

void process_before_start( effect_instance: EffectInstance ) ​

Instant dash uses immediate (-1.0) so start_effect() applies once and finishes. Smooth dash uses parent's permanent (0.0) — movement timer controls lifecycle.

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.