Skip to content

OrbitEffect ​

Inherits: MoveToPointEffect < CompositeEffect < Effect < DatabaseResource < Resource

OrbitEffect: Entity orbits around a target entity or position Uses velocity-based movement updated each frame to trace a circular path around the target. Supports configurable radius, speed, and direction.

Description ​

Perfect for whirlwind attacks circling an enemy, satellite guard abilities, spirit wolves closing in, or channeled abilities with orbital movement.

Properties ​

floatorbit_radius3.0
floatorbit_speed180.0
OrbitDirectionorbit_directionOrbitDirection.CLOCKWISE
floatorbit_duration3.0
OrbitEndBehaviorend_behaviorOrbitEndBehavior.STOP_IN_PLACE
boolsmooth_entrytrue
floatentry_duration0.3
boolspiral_inwardfalse
floatspiral_end_radius0.0

Methods ​

voidprocess_before_start( effect_instance: EffectInstance )
voidapply_movement_to_point( effect_instance: EffectInstance, entity: Entity, _target_position: Vector3 )
voidon_apply_finished( effect_instance: EffectInstance )
Stringget_effect_description()
Stringget_editor_description()

Enumerations ​

enum OrbitDirection ​

The options of orbit direction: clockwise, counter clockwise.

  • CLOCKWISE = 0
  • COUNTER_CLOCKWISE = 1

enum OrbitEndBehavior ​

The options of orbit end behavior: stop in place, return to start, move to target.

  • STOP_IN_PLACE = 0 - Entity stops wherever it is when orbit ends
  • RETURN_TO_START = 1 - Entity teleports back to starting position
  • MOVE_TO_TARGET = 2 - Entity moves to the orbit center (the target)

Property descriptions ​

Orbit Settings

float orbit_radius = 3.0 ​

Radius of the orbit in units

float orbit_speed = 180.0 ​

Rotational speed in degrees per second

OrbitDirection orbit_direction = OrbitDirection.CLOCKWISE ​

Rotation direction

float orbit_duration = 3.0 ​

How long the orbit lasts (0 = permanent until cancelled)

Orbit Behavior

OrbitEndBehavior end_behavior = OrbitEndBehavior.STOP_IN_PLACE ​

What happens when the orbit ends

bool smooth_entry = true ​

Whether to smoothly move to orbit radius on start (vs instant snap)

float entry_duration = 0.3 ​

Time to reach orbit radius from current position

bool spiral_inward = false ​

Whether the orbit radius shrinks over time (spiral inward)

float spiral_end_radius = 0.0 ​

Final radius when spiraling inward (0 = reach the center)

Method descriptions ​

void process_before_start( effect_instance: EffectInstance ) ​

Called just before the effect starts: sets what must be known first (a permanent duration).

void apply_movement_to_point( effect_instance: EffectInstance, entity: Entity, _target_position: Vector3 ) ​

Moves the entity to the target point.

void on_apply_finished( effect_instance: EffectInstance ) ​

Called when the effect ends: takes back what it did.

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.