Skip to content

CollisionProjectileTrigger ​

Inherits: ProjectileTrigger < RefCounted

Collision-based trigger strategy - updated for InteractableObject support

Variables ​

CollisionLayerUtility.HitModehit_modeCollisionLayerUtility.HitMode.TARGET_ONLY
intpierce_count0
boolstop_on_world_hittrue
boolstop_on_target_hittrue
Array[Variant]targets_hit[]
inthits_remaining0

Methods ​

voidconfigure_collision_trigger( new_hit_mode: CollisionLayerUtility.HitMode, new_pierce_count: int = 0, new_stop_on_world: bool = true, new_stop_on_target: bool = true )

Variable descriptions ​

CollisionLayerUtility.HitMode hit_mode = CollisionLayerUtility.HitMode.TARGET_ONLY ​

Hit mode from ProjectileEffect

int pierce_count = 0 ​

Pierce count (0 = stop on first, -1 = infinite, >0 = pierce X targets)

bool stop_on_world_hit = true ​

Whether to stop when hitting world objects

bool stop_on_target_hit = true ​

Whether to stop when hitting the intended target

Array[Variant] targets_hit = [] ​

Targets that have been hit by this projectile (Entity or InteractableObject)

int hits_remaining = 0 ​

Number of hits remaining (for pierce tracking)

Method descriptions ​

void configure_collision_trigger( new_hit_mode: CollisionLayerUtility.HitMode, new_pierce_count: int = 0, new_stop_on_world: bool = true, new_stop_on_target: bool = true ) ​

Configure collision trigger (called by ProjectileEffect)