Skip to content

VFXPointToPointPath ​

Inherits: VFX < Node3D

Point-to-Point Path VFX - Spawns multiple VFX along a path between points Perfect for fire walls, ice barriers, poison gas lines, spike rows, etc.

Properties ​

Node3Dvfx_source_node
floatsection_size2.0
floatsection_overlap0.0
floatpath_curve_strength0.0
boolfollow_terrainfalse
floatterrain_offset0.1
floatmax_slope_angle45.0
boolspawn_progressivelyfalse
floatspawn_delay0.1
boolspawn_from_starttrue
intmax_sections50
booldespawn_distant_sectionsfalse
floatdespawn_distance100.0

Variables ​

Array[Vector3]path_points[] # The path points to follow
Array[Node3D]spawned_sections[]
Array[Vector3]section_positions[]
floattotal_path_length0.0
Timerspawn_timer
intcurrent_spawn_index0
boolis_spawningfalse

Methods ​

floatdefault_fade_in()
floatdefault_fade_out()
voidset_path_points( points: Array[Vector3] )
voiddeactivate_vfx()
voidadd_path_point( point: Vector3 )
voidcull_distant_sections( reference_position: Vector3 )
VFXPointToPointPathcreate_fire_wall( start_pos: Vector3, end_pos: Vector3, source_node: Node3D ) static
VFXPointToPointPathcreate_curved_barrier( points: Array[Vector3], source_node: Node3D ) static

Property descriptions ​

Path Settings

Node3D vfx_source_node ​

The node whose children will be duplicated along the path

float section_size = 2.0 ​

Size of each VFX section

float section_overlap = 0.0 ​

How much sections overlap (-1 to 1)

float path_curve_strength = 0.0 ​

Bezier curve strength (0 = straight lines)

Terrain Following

bool follow_terrain = false ​

Adjust Y position to ground

float terrain_offset = 0.1 ​

Height offset above terrain

float max_slope_angle = 45.0 ​

Skip surfaces steeper than this (degrees)

Dynamic Spawning

bool spawn_progressively = false ​

Spawn sections over time

float spawn_delay = 0.1 ​

Delay between spawning each section

bool spawn_from_start = true ​

Spawn from start to end (vs random)

Section Management

int max_sections = 50 ​

Maximum number of sections to prevent performance issues

bool despawn_distant_sections = false ​

Remove sections far from camera/player

float despawn_distance = 100.0 ​

Distance threshold for despawning

Variable descriptions ​

Array[Vector3] path_points = [] # The path points to follow ​

Path and section management

Array[Node3D] spawned_sections = [] ​

Currently active VFX sections

Array[Vector3] section_positions = [] ​

Calculated positions for each section

float total_path_length = 0.0 ​

The length of the path.

Timer spawn_timer ​

Progressive spawning

int current_spawn_index = 0 ​

How many effects were placed along the path so far.

bool is_spawning = false ​

True while the effects are placed one after the other.

Method descriptions ​

float default_fade_in() ​

========== INITIALIZATION ========== A path fades in over 0.2 s and out over 0.3 s

float default_fade_out() ​

The fade out of the kind of effect (VFX: 0.2 s); a kind overrides it (from VFX)

void set_path_points( points: Array[Vector3] ) ​

Set the path points for VFX spawning

void deactivate_vfx() ​

Override cleanup to handle spawned sections

void add_path_point( point: Vector3 ) ​

Add point to existing path (useful for dynamic path building)

void cull_distant_sections( reference_position: Vector3 ) ​

Remove sections beyond a certain distance (for performance)

VFXPointToPointPath create_fire_wall( start_pos: Vector3, end_pos: Vector3, source_node: Node3D ) ​

Quick factory method for fire walls

VFXPointToPointPath create_curved_barrier( points: Array[Vector3], source_node: Node3D ) ​

Quick factory method for curved barriers