Fire on solutions: FireControl.Solution is each gun's one solution; the trigger fires on it without the aim

Bears is extracted from PFire; ArcPermitsFire passes on a fused gun, a solution, or a free aim in arc.
Solve flies along Solution's direction. ArticulationPoint loses its yaw clamp and follows a per-group
aim point placed from the group's solution. Arcs gets its new brief; Broadside is new.
Unverified: first commit of the cut, not yet built.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-08 13:25:53 +02:00
commit e103b90aea
13 changed files with 370 additions and 50 deletions

View file

@ -4,15 +4,14 @@ using UnityEngine;
using CultMath;
using static CultMath.math;
// Presentation only: the barrel follows the point its group's solution places (EntityInstance), which FireControl has
// already clamped to the arc. This decides no arc; Speed and the pitch clamp are how the picture slews.
public class ArticulationPoint : MonoBehaviour
{
public Transform Target;
public int Group;
public float YawMin;
public float YawMax;
public float PitchMin;
public float PitchMax;
@ -30,7 +29,7 @@ public class ArticulationPoint : MonoBehaviour
var yaw = Vector2.SignedAngle(new Vector2(0, 1), new Vector2(targetLocal.x, targetLocal.z));
var pitch = Vector2.SignedAngle(new Vector2(1, 0), new Vector2(targetLocal.z, targetLocal.y));
var targetYaw = clamp(_yaw - yaw, YawMin, YawMax);
var targetYaw = _yaw - yaw;
var targetPitch = clamp(_pitch - pitch, PitchMin, PitchMax);
if (abs(targetYaw - _yaw) < Speed * Time.deltaTime)