Skip to content

Comments

Add universal two-point effect system to Lua API#9

Draft
Copilot wants to merge 3 commits intoDevelopXfrom
copilot/add-twopoint-system
Draft

Add universal two-point effect system to Lua API#9
Copilot wants to merge 3 commits intoDevelopXfrom
copilot/add-twopoint-system

Conversation

Copy link

Copilot AI commented Feb 20, 2026

Checklist

Links to issue(s) this pull request concerns (if applicable)

N/A

Pull request description

Adds TEN.Effects.EmitTwoPointEffect(origin, target, options) — a parameter-driven visual effect system for rendering customizable effects between two 3D points. Different option combinations produce ropes, beams, lasers, chains, etc.

New files

  • Game/effects/TwoPointEffect.h/cppTwoPointEffectData struct (all spec'd parameters), TwoPointEffectController (spawn with 128-pool cap, per-frame life/opacity decay, animation time accumulation, expired effect cleanup)

Engine integration

  • Game/control/control.cppUpdate() and Clear() calls in game loop
  • Renderer/Renderer.h + RendererDrawEffect.cppPrepareTwoPointEffects() generates camera-facing quads per segment with interpolation support
  • Renderer/RendererDraw.cpp — Hooked into render preparation pipeline
  • TombEngine.vcxproj — New files registered

Lua API

  • EffectsFunctions.cppEmitTwoPointEffect parses a sol::table options arg with all parameters clamped to spec ranges
  • ReservedScriptNames.hScriptReserved_EmitTwoPointEffect

Supported parameters

Category Parameters
Core color, colorEnd, width, widthEnd, life, segments, opacity, blendMode
Shape sag, sagDirection, tension, noise, noiseFrequency, twist, coneAngle
Animation sway, swaySpeed, swayAxis, pulse, pulseSpeed, flicker, flickerSpeed, scrollSpeed, waveAmplitude, waveFrequency, waveSpeed
Glow glow, glowIntensity, glowWidth, glowColor
Segmentation segmented, segmentSize, segmentGap, dashed, dashLength, dashGap, dashOffset

Example usage

TEN.Effects.EmitTwoPointEffect(
    Vec3(1000, 500, 2000),
    Vec3(3000, 500, 2000),
    {
        color = Color(255, 100, 50),
        width = 16,
        life = 5.0,
        sag = 0.5,
        segments = 32,
        glow = true,
        blendMode = TEN.Effects.BlendID.ADDITIVE
    }
)

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits February 20, 2026 18:35
- New TwoPointEffect.h/cpp: effect data structure and controller
- Renderer: PrepareTwoPointEffects() for rendering segment quads
- Lua API: EmitTwoPointEffect(origin, target, options) function
- Support for: color gradients, sag, noise, wave, sway, pulse,
  flicker, twist, cone angle, glow, dashed/segmented rendering
- Integrated into game update loop and render pipeline

Co-authored-by: TrainWrack <120750885+TrainWrack@users.noreply.github.com>
Co-authored-by: TrainWrack <120750885+TrainWrack@users.noreply.github.com>
Copilot AI changed the title [WIP] Add twoPoint system functionality Add universal two-point effect system to Lua API Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants