DestinationProjectileTrigger ​
Inherits: ProjectileTrigger < RefCounted
Destination-based trigger strategy - updated for InteractableObject support Used for homing missiles that explode on proximity, etc.
Variables ​
float | arrival_threshold | 1.0 |
bool | track_moving_targets | true |
bool | also_trigger_on_collision | false |
Methods ​
float | get_distance_to_target() |
Vector3 | get_direction_to_target() |
void | set_arrival_threshold( threshold: float ) |
void | set_track_moving_targets( track: bool ) |
void | set_also_trigger_on_collision( trigger: bool ) |
bool | is_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