diff --git a/1.6/1.6/Assemblies/ArachnaeSwarm.dll b/1.6/1.6/Assemblies/ArachnaeSwarm.dll index b9a9454..64b692c 100644 Binary files a/1.6/1.6/Assemblies/ArachnaeSwarm.dll and b/1.6/1.6/Assemblies/ArachnaeSwarm.dll differ diff --git a/1.6/1.6/Defs/Thing_Misc/Weapons/ARA_Weapon_Laser.xml b/1.6/1.6/Defs/Thing_Misc/Weapons/ARA_Weapon_Laser.xml index a6ddcc4..ee2a734 100644 --- a/1.6/1.6/Defs/Thing_Misc/Weapons/ARA_Weapon_Laser.xml +++ b/1.6/1.6/Defs/Thing_Misc/Weapons/ARA_Weapon_Laser.xml @@ -143,7 +143,7 @@ GraserBeam_End Fleck_Wula_Dark_Matter_Beam 0.5 - 1.5 + 1 true diff --git a/Source/ArachnaeSwarm/Verbs/Verb_ShootBeamSplitAndChain.cs b/Source/ArachnaeSwarm/Verbs/Verb_ShootBeamSplitAndChain.cs index 8565011..9e0d61f 100644 --- a/Source/ArachnaeSwarm/Verbs/Verb_ShootBeamSplitAndChain.cs +++ b/Source/ArachnaeSwarm/Verbs/Verb_ShootBeamSplitAndChain.cs @@ -173,7 +173,12 @@ namespace ArachnaeSwarm // 1. Generate Bezier curve points int segments = Mathf.Max(3, Mathf.CeilToInt(magnitude * Props.flecksPerCell)); - Vector3 controlPoint = Vector3.Lerp(start, end, 0.5f) + new Vector3(0, -magnitude * Props.beamCurvature, 0); + // --- ULTIMATE CURVE FIX --- + // The control point must be offset perpendicular to the beam's direction on the XZ plane, not on the Y axis. + Vector3 direction = (end - start).normalized; + Vector3 perpendicular = new Vector3(-direction.z, 0, direction.x); // Rotated 90 degrees on the XZ plane. + + Vector3 controlPoint = Vector3.Lerp(start, end, 0.5f) + perpendicular * magnitude * Props.beamCurvature; var path = BezierUtil.GenerateQuadraticPoints(start, controlPoint, end, segments); // 2. Check if there are enough points to connect if (path.Count < 2)