Skip to content

PhysicsProjectileEffect ​

Inherits: BaseProjectileEffect < CompositeEffect < Effect < DatabaseResource < Resource

Physics projectile effect - ballistic movement with selectable trigger Can use collision, destination, or timer triggers for different behaviors

Properties ​

TriggerTypetrigger_typeTriggerType.COLLISION
booluse_high_arcfalse
floatlaunch_angle_override0.0
floatgravity_scale1.0
booluse_gravitytrue
floatprojectile_mass1.0
floatlinear_damping0.0
CollisionLayerUtility.HitModehit_modeCollisionLayerUtility.HitMode.TARGET_ONLY
intpierce_count0
boolstop_on_world_hittrue
boolstop_on_target_hittrue
floatarrival_threshold2.0
booltrack_moving_targetstrue
boolalso_trigger_on_collisionfalse
floatdetonation_timer4.0
booltrigger_on_expiretrue
booltrigger_on_cancelledfalse
boolalso_trigger_on_collision_timertrue

Methods ​

Stringget_effect_description()
Stringget_editor_description()

Property descriptions ​

Trigger Settings

TriggerType trigger_type = TriggerType.COLLISION ​

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

Physics Settings

bool use_high_arc = false ​

Use high arc vs low arc trajectory

float launch_angle_override = 0.0 ​

Override angle in degrees (0 = auto)

float gravity_scale = 1.0 ​

Gravity multiplier

bool use_gravity = true ​

Enable/disable gravity

float projectile_mass = 1.0 ​

Mass for physics calculations

float linear_damping = 0.0 ​

Air resistance

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.

Destination Settings

float arrival_threshold = 2.0 ​

Distance to consider destination reached

bool track_moving_targets = true ​

Update destination for moving Entity targets

bool also_trigger_on_collision = false ​

Also trigger on collision while moving to destination

Timer Settings

float detonation_timer = 4.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 = true ​

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.