VFXPointToPointBeam ​
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 ​
float | beam_width | 1.0 |
int | beam_segments | 10 |
float | curve_intensity | 0.0 |
bool | follow_target_movement | true |
bool | update_continuously | true |
Variables ​
Variant # Node3D or Vector3 | start_target | |
Variant | end_target | |
Array[Variant] | chain_targets | [] |
MeshInstance3D | beam_mesh | |
Node3D | beam_rotation | |
Material | beam_material | |
Array[VFXPointToPointBeam] | chain_beams | [] |
bool | supports_chaining | false |
int | max_chain_targets | 3 |
float | chain_range | 5.0 |
Vector3 | last_start_pos | |
Vector3 | last_end_pos | |
BeamState | beam_state | BeamState.STARTING |
bool | manually_stopped | false |
bool | has_start_animation | false |
bool | has_loop_animation | false |
bool | has_end_animation | false |
Methods ​
void | stop_beam() |
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 ) |
void | set_beam_targets( start: Variant, end: Variant ) |
void | set_chain_targets( targets: Array[Variant] ) |
void | update_beam() |
bool | are_targets_valid() |
void | activate_vfx( selection: VFXSelection = null ) |
void | deactivate_vfx() |
float | default_fade_in() |
float | default_fade_out() |
bool | is_beam_looping() |
bool | is_beam_ending() |
void | force_stop_beam() |
void | stop_continuous_updates() |
void | resume_continuous_updates() |
bool | has_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