Skip to content

HomingProjectileEffect ​

Inherits: BaseProjectileEffect < CompositeEffect < Effect < DatabaseResource < Resource

Homing projectile effect - tracks target with optional curve patterns Uses steering behaviors to home in on moving or stationary targets

Properties ​

TriggerTypetrigger_typeTriggerType.COLLISION
floathoming_strength0.8
floatmax_turn_rate_degrees180.0
booluse_smooth_steeringtrue
floatmax_speed30.0
floatarrival_threshold1.5
booluse_curved_homingfalse
CurveTypecurve_type0
floatcurve_strength0.3
floatoscillation_frequency2.0
floatoscillation_amplitude1.0
CurvedHomingMovement.CurveRotationModecurve_rotation_modeCurvedHomingMovement.CurveRotationMode.RANDOM_RANGE
floatfixed_curve_rotation0.0
floatrandom_rotation_range90.0
CollisionLayerUtility.HitModehit_modeCollisionLayerUtility.HitMode.TARGET_ONLY
intpierce_count0
boolstop_on_world_hittrue
boolstop_on_target_hittrue
floatdetonation_timer3.0
booltrigger_on_expiretrue
booltrigger_on_cancelledfalse
boolalso_trigger_on_collision_timerfalse

Methods ​

Stringget_effect_description()
Stringget_editor_description()

Enumerations ​

enum CurveType ​

The options of curve type: straight, oscillating, spiral, sine wave, drunke.

  • STRAIGHT = 0
  • OSCILLATING = 1
  • SPIRAL = 2
  • SINE_WAVE = 3
  • DRUNKE = 4

Property descriptions ​

Trigger Settings

TriggerType trigger_type = TriggerType.COLLISION ​

What makes the projectile apply its effects: a collision, reaching the destination, or a timer.

Homing Settings

float homing_strength = 0.8 ​

How strongly the projectile turns toward the target (0 to 1).

float max_turn_rate_degrees = 180.0 ​

The most the projectile can turn each second, in degrees.

bool use_smooth_steering = true ​

True when the projectile turns smoothly.

float max_speed = 30.0 ​

The top speed of the projectile.

float arrival_threshold = 1.5 ​

How close to the target counts as arrived.

Curve Settings

bool use_curved_homing = false ​

Enable curved patterns while homing

CurveType curve_type = 0 ​

Type of curve pattern

float curve_strength = 0.3 ​

How much curve affects movement (0.0 to 1.0)

float oscillation_frequency = 2.0 ​

Oscillation speed for patterns

float oscillation_amplitude = 1.0 ​

Oscillation strength for patterns

Curve Rotation

CurvedHomingMovement.CurveRotationMode curve_rotation_mode = CurvedHomingMovement.CurveRotationMode.RANDOM_RANGE ​

How the curve of the path is rotated for each projectile.

float fixed_curve_rotation = 0.0 ​

Degrees from default UP position

float random_rotation_range = 90.0 ​

Degrees of random variation from default

Collision Settings

CollisionLayerUtility.HitMode hit_mode = CollisionLayerUtility.HitMode.TARGET_ONLY ​

What the projectile hits on its way.

int pierce_count = 0 ​

0 = stop on first, -1 = infinite, >0 = pierce X targets

bool stop_on_world_hit = true ​

True when the projectile stops when it hits the world.

bool stop_on_target_hit = true ​

True when the projectile stops when it hits a target.

Timer Settings

float detonation_timer = 3.0 ​

Time before trigger activates

bool trigger_on_expire = true ​

Trigger when timer expires

bool trigger_on_cancelled = false ​

Manual detonation when effect cancelled

bool also_trigger_on_collision_timer = false ​

Also trigger on collision for timer

Method descriptions ​

String get_effect_description() ​

Get effect description for tooltips

String get_editor_description() ​

A short text for the effect editor that says what the effect does.