Skip to content

DestinationProjectileTrigger ​

Inherits: ProjectileTrigger < RefCounted

Destination-based trigger strategy - updated for InteractableObject support Used for homing missiles that explode on proximity, etc.

Variables ​

floatarrival_threshold1.0
booltrack_moving_targetstrue
boolalso_trigger_on_collisionfalse

Methods ​

floatget_distance_to_target()
Vector3get_direction_to_target()
voidset_arrival_threshold( threshold: float )
voidset_track_moving_targets( track: bool )
voidset_also_trigger_on_collision( trigger: bool )
boolis_target_valid()

Variable descriptions ​

float arrival_threshold = 1.0 ​

Distance threshold to consider destination reached

bool track_moving_targets = true ​

Whether to track moving targets (Entity or InteractableObject)

bool also_trigger_on_collision = false ​

Whether to also trigger on collision

Method descriptions ​

float get_distance_to_target() ​

Get distance to target (handles Entity, InteractableObject vs Vector3)

Vector3 get_direction_to_target() ​

Get direction to target - Updated for InteractableObject

void set_arrival_threshold( threshold: float ) ​

Set arrival threshold

void set_track_moving_targets( track: bool ) ​

Set whether to track moving targets

void set_also_trigger_on_collision( trigger: bool ) ​

Set whether to also trigger on collision

bool is_target_valid() ​

Check if target is still valid