vfx-lightning

Creates procedural lightning bolt effects in Summer Engine using ImmediateMesh, glow shaders, and camera shake.

66|4|Updated Feb 26, 2026
One-click install
npx skills add https://github.com/SummerEngine/summer --skill vfx-lightning-summerengine
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vfx-lightning
Source: https://github.com/SummerEngine/summer/tree/main/library/skills/vfx-lightning
Command: npx skills add https://github.com/SummerEngine/summer --skill vfx-lightning-summerengine

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building a convincing lightning bolt effect in a game engine requires coordinating mesh generation, shader programming, particle spawning, and camera feedback — a multi-system task that is easy to get wrong (wrong blend modes, missing depth handling, broken autoload lookups). This Skill provides a complete, verified recipe for a jagged two-point lightning bolt in Summer Engine. ## Core Features & Use Cases - Procedural bolt generation: Builds a jagged polyline via midpoint displacement in GDScript, drawn as an ImmediateMesh triangle strip with a billboard vertex shader and additive glow fragment shader. - Full impact package: Spawns hit-spark particles at both endpoints and triggers trauma-based camera shake through the CameraShake autoload on every cast. - Named variants: Ships tuned parameter presets for thunderbolt, chain-lightning, tesla-arc, and held plasma-laser beams, plus anti-patterns, performance notes, and edge-case handling. - Use Case: A player casts a chain-lightning spell — the agent writes the shader and caster script via MCP tools, places a LightningCaster node in the scene, and gameplay code calls cast_lightning between each chained enemy with damage applied per hit. ## Quick Start Ask your AI agent to add a lightning bolt effect to your Summer Engine game that fires from the wizard's hand to an enemy with glow, sparks, and screen shake.

Frequently Asked Questions about vfx-lightning

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a lightning bolt effect in Summer Engine?

Create a lightning bolt by writing the lightning.gdshader and lightning_caster.gd files, adding a LightningCaster Node3D to your scene, and calling cast_lightning(from, to) from gameplay code. The recipe generates a jagged ImmediateMesh path with a glow shader, endpoint sparks, and camera shake.

How to make chain lightning between multiple enemies in GDScript?

Chain lightning works by calling cast_lightning once per segment, passing the previous enemy position as the origin and the next enemy as the target. Apply damage per hit and add a short timer delay between segments for readability.

Does Summer Engine have a Line3D node for drawing bolts?

No, the current Summer build has no Line3D class, and Line2D is 2D-only. The recipe uses an ImmediateMesh triangle strip with a billboard vertex shader instead, which renders the bolt facing the camera.

Why is my camera shake not firing when the lightning casts?

Camera shake fails if you gate the call on Engine.has_singleton("CameraShake"), which is always false for autoloads. Autoloads are nodes at /root/CameraShake, so look them up with get_node_or_null and check for the add_trauma method.

When should I not use this lightning bolt recipe?

Avoid this recipe for continuous held beams, ambient electricity on objects, 2D UI effects, or simple bullet tracers. Held beams should use a stretched cylinder MeshInstance3D updated per frame with the same shader instead of the one-shot ImmediateMesh pattern.