Skip to content

VFXPointToPointBeam ​

Inherits: VFX < Node3D

Point-to-Point Beam VFX - Direct beam/chain effects between targets Handles beams, lightning chains, tethers, laser effects, etc. Supports both Node3D (trackable) and Vector3 (static) targets Features start/loop/end animation sequence support

Properties ​

floatbeam_width1.0
intbeam_segments10
floatcurve_intensity0.0
boolfollow_target_movementtrue
boolupdate_continuouslytrue

Variables ​

Variant # Node3D or Vector3start_target
Variantend_target
Array[Variant]chain_targets[]
MeshInstance3Dbeam_mesh
Node3Dbeam_rotation
Materialbeam_material
Array[VFXPointToPointBeam]chain_beams[]
boolsupports_chainingfalse
intmax_chain_targets3
floatchain_range5.0
Vector3last_start_pos
Vector3last_end_pos
BeamStatebeam_stateBeamState.STARTING
boolmanually_stoppedfalse
boolhas_start_animationfalse
boolhas_loop_animationfalse
boolhas_end_animationfalse

Methods ​

voidstop_beam()
voidset_beam_targets_with_attachments( start: Variant, end: Variant, start_attachment: VFXSelection.VfxLocation = VFXSelection.VfxLocation.BASE, end_attachment: VFXSelection.VfxLocation = VFXSelection.VfxLocation.BASE, start_offset: Vector3 = Vector3.ZERO, end_offset: Vector3 = Vector3.ZERO )
voidset_beam_targets( start: Variant, end: Variant )
voidset_chain_targets( targets: Array[Variant] )
voidupdate_beam()
boolare_targets_valid()
voidactivate_vfx( selection: VFXSelection = null )
voiddeactivate_vfx()
floatdefault_fade_in()
floatdefault_fade_out()
boolis_beam_looping()
boolis_beam_ending()
voidforce_stop_beam()
voidstop_continuous_updates()
voidresume_continuous_updates()
boolhas_duration_override()

Enumerations ​

enum BeamState ​

Beam animation state

  • STARTING = 0
  • LOOPING = 1
  • ENDING = 2
  • FINISHED = 3

Property descriptions ​

Point-to-Point Settings

float beam_width = 1.0 ​

The width of the beam.

int beam_segments = 10 ​

How many segments the beam has (more is smoother when it curves).

float curve_intensity = 0.0 ​

How much the beam curves between its ends (0 = straight).

bool follow_target_movement = true ​

True when the beam follows a target that moves.

bool update_continuously = true ​

True when the beam is redrawn every frame.

Variable descriptions ​

Variant # Node3D or Vector3 start_target ​

Beam targets and positioning - supports Variant (Node3D or Vector3)

Variant end_target ​

Node3D or Vector3

Array[Variant] chain_targets = [] ​

For multi-target chains

MeshInstance3D beam_mesh ​

Beam visual components

Node3D beam_rotation ​

The node that turns the beam toward its end.

Material beam_material ​

The material of the beam.

Array[VFXPointToPointBeam] chain_beams = [] ​

Chain management for multi-target beams

bool supports_chaining = false ​

True when the beam can jump from target to target.

int max_chain_targets = 3 ​

How many targets the beam can jump to.

float chain_range = 5.0 ​

How far the beam can jump.

Vector3 last_start_pos ​

Update tracking

Vector3 last_end_pos ​

Where the beam ended on the last frame.

BeamState beam_state = BeamState.STARTING ​

Which part the beam plays: starting, looping or ending.

bool manually_stopped = false ​

True when something stopped the beam by hand.

bool has_start_animation = false ​

Animation discovery

bool has_loop_animation = false ​

True when the beam has a loop animation.

bool has_end_animation = false ​

True when the beam has an end animation.

Method descriptions ​

void stop_beam() ​

Stop beam gracefully (triggers end sequence if available)

void set_beam_targets_with_attachments( start: Variant, end: Variant, start_attachment: VFXSelection.VfxLocation = VFXSelection.VfxLocation.BASE, end_attachment: VFXSelection.VfxLocation = VFXSelection.VfxLocation.BASE, start_offset: Vector3 = Vector3.ZERO, end_offset: Vector3 = Vector3.ZERO ) ​

Set beam targets with attachment point support (called by VFXManager)

void set_beam_targets( start: Variant, end: Variant ) ​

Set the start and end targets for the beam - supports Node3D and Vector3

void set_chain_targets( targets: Array[Variant] ) ​

Set multiple targets for chain effects - supports mixed types

void update_beam() ​

Update beam geometry (enhanced for animation integration)

bool are_targets_valid() ​

Check if targets are still valid

void activate_vfx( selection: VFXSelection = null ) ​

Override activate_vfx to ensure visibility

void deactivate_vfx() ​

Override cleanup to handle animation state and variant targets

float default_fade_in() ​

A beam fades in over 0.12 s

float default_fade_out() ​

A beam with an end animation fades out over it, without one over 0.25 s

bool is_beam_looping() ​

Check if beam is in looping phase

bool is_beam_ending() ​

Check if beam is ending

void force_stop_beam() ​

Force stop without end animation (immediate cleanup)

void stop_continuous_updates() ​

Stop updating beam (useful for performance when beam is static)

void resume_continuous_updates() ​

Resume updating beam

bool has_duration_override() ​

Check if duration override is active