From a9bbea5091e4cbbf3a4a1e6a79a6bc8181d41041 Mon Sep 17 00:00:00 2001 From: soul Date: Thu, 29 Oct 2026 07:33:28 +0100 Subject: [PATCH] Weapon crosshairs ride the gravity field: the aim point takes its own field height, not the ship's level plane On a slope the level projection floated over downhill aim and sank into uphill aim (operator report, 2026-10-29). Co-Authored-By: Claude Opus 5.5 --- Assets/Scripts/Gameplay/ActionGameManager.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Assets/Scripts/Gameplay/ActionGameManager.cs b/Assets/Scripts/Gameplay/ActionGameManager.cs index 2af138d91..841eb9d09 100644 --- a/Assets/Scripts/Gameplay/ActionGameManager.cs +++ b/Assets/Scripts/Gameplay/ActionGameManager.cs @@ -1435,12 +1435,17 @@ public class ActionGameManager : MonoBehaviour else if (target.Entity != null) TargetIndicator.Target = DrawAhead.Position(target.Entity, lead).ToUnity(); var distance = length(ViewDot.Target.ToCultMath() - ownDrawn); + var ownField = DrawAhead.Height(CurrentEntity.Zone, ownDrawn.xz, lead); foreach (var (_, barrels, crosshair) in _articulationGroups) { var averagePosition = Vector3.zero; foreach (var barrel in barrels) averagePosition += barrel.position + barrel.forward * distance; averagePosition /= barrels.Length; + // Shots fly over the field, so the crosshair rides it too: the aim point's own field height, plus the barrels' height + // above the field under the ship. A level projection floats over downhill aim and sinks into uphill aim. + var aimPlanar = float2(averagePosition.x, averagePosition.z); + averagePosition.y += DrawAhead.Height(CurrentEntity.Zone, aimPlanar, lead) - ownField; crosshair.Target = averagePosition; }