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 ​
float | orbit_radius | 3.0 |
float | orbit_speed | 180.0 |
OrbitDirection | orbit_direction | OrbitDirection.CLOCKWISE |
float | orbit_duration | 3.0 |
OrbitEndBehavior | end_behavior | OrbitEndBehavior.STOP_IN_PLACE |
bool | smooth_entry | true |
float | entry_duration | 0.3 |
bool | spiral_inward | false |
float | spiral_end_radius | 0.0 |
Methods ​
void | process_before_start( effect_instance: EffectInstance ) |
void | apply_movement_to_point( effect_instance: EffectInstance, entity: Entity, _target_position: Vector3 ) |
void | on_apply_finished( effect_instance: EffectInstance ) |
String | get_effect_description() |
String | get_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.