Aetheria/Assets/Scripts/Gameplay
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Meta Vens a454a5a77f Collapse the two implicit shield ellipsoids into ShieldEnvelope (Cut 2)
FieldDriver derived the shield ellipsoid from its own transform.localScale;
ShieldManager derived it independently from the Shield prefab instance's
transform, doing the same normalise-and-project by hand against a different
object. Add ShieldEnvelope as the one reader of a transform's centre, radii,
surface projection, and true outward normal (derived, not authored, per R6 --
no second copy of numbers the physical MeshCollider already owns), and switch
both consumers onto it, deleting their hand-rolled projections.

Radii read the attached collider mesh's own bounds.extents per axis rather
than assuming a flat 0.5 or 1.0: Shield.prefab's Icosphere collider measures
(0.0095106, 0.01, 0.01), not a uniform round number, and the cubesphere's
collider measures exactly (1,1,1) -- confirmed by a throwaway batchmode probe
against the actual mesh assets, not guessed.

SurfaceNormal is not normalize(p): a non-uniform ellipsoid's true normal is
the gradient of the implicit surface, transformed by rotation and the INVERSE
of lossyScale (a normal is a covector). The first implementation used
TransformDirection (rotation and forward scale) and the batchmode probe's
finite-difference gradient check caught it immediately -- exactly the
plausible-looking-wrong-answer failure mode the cut map called out by name.
Both original consumers keep normalize(p)-equivalent behaviour via the new
SurfaceDirection method, since they only ever wanted a direction.

FieldDriver falls back to its pre-cut formulas (logged once) when no
ShieldEnvelope is present, since it has no guaranteed carrier yet.
ShieldManager does not: every object that carries it gets an envelope in this
cut, so a missing one logs an error and degrades to a fixed direction rather
than recomputing a second projection.

No prefab or scene file is touched here (Q5: the operator rigs prefabs and
scenes by hand); ShieldPanelCut2Verify's batchmode probe instead builds
synthetic transforms carrying Longinus's and Djinni's actual override values
plus the real Icosphere mesh, and proves ProjectToSurface lands exactly on the
ellipsoid and SurfaceNormal matches a finite-difference gradient to 1e-3.
mutation_tests_shield_panel_cut2.py mutates SurfaceNormal three ways (back to
normalize(p), back to TransformDirection, and a flattened 0.5 extents factor)
and confirms the probe goes red for each, naming the reason.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-18 06:33:38 +02:00
..
Weapons Delete AetheriaMath in favour of CultMath 2026-09-14 18:02:41 +02:00
ActionBarSlot.cs Switch engine asset references from Resources paths to Addressables GUIDs 2026-09-18 05:04:50 +02:00
ActionBarSlot.cs.meta Action Bar (WIP) 2021-04-18 05:13:20 +01:00
ActionGameManager.cs Cut 0: give Entity its own EntitySettings copy, delete the duplicate copies 2026-09-17 18:22:22 +02:00
ActionGameManager.cs.meta Weapon Scripting Overhaul 2021-01-25 05:53:36 +00:00
ArticulationPoint.cs Swap Unity.Mathematics usings for CultMath 2026-09-14 17:39:12 +02:00
ArticulationPoint.cs.meta Weapon Scripting Overhaul 2021-01-25 05:53:36 +00:00
CapabilityPresentationBinder.cs Add presenter interfaces and a capability event binder 2026-09-17 14:36:27 +02:00
CapabilityPresentationBinder.cs.meta Add presenter interfaces and a capability event binder 2026-09-17 14:36:27 +02:00
CapabilityPresenters.cs Add presenter interfaces and a capability event binder 2026-09-17 14:36:27 +02:00
CapabilityPresenters.cs.meta Add presenter interfaces and a capability event binder 2026-09-17 14:36:27 +02:00
EntityInstance.cs Switch engine asset references from Resources paths to Addressables GUIDs 2026-09-18 05:04:50 +02:00
EntityInstance.cs.meta Combat & Visibility & Collisions 2021-02-26 19:01:47 +00:00
FieldDriver.cs Collapse the two implicit shield ellipsoids into ShieldEnvelope (Cut 2) 2026-09-18 06:33:38 +02:00
FieldDriver.cs.meta Shields 2025-01-30 01:58:05 +00:00
GameSettings.cs Cut 0: delete dead soundbank and HullHitColor fields (fork X) 2026-09-17 18:22:00 +02:00
GameSettings.cs.meta Misc. Improvements 2021-01-27 16:14:41 +00:00
GridObject.cs Convert engine types through CultMath.UnityBridge 2026-09-14 17:47:33 +02:00
GridObject.cs.meta Loot 2021-04-15 04:25:22 +01:00
HullCollider.cs Convert engine types through CultMath.UnityBridge 2026-09-14 17:47:33 +02:00
HullCollider.cs.meta Weapon Scripting Overhaul 2021-01-25 05:53:36 +00:00
ItemPickup.cs Convert engine types through CultMath.UnityBridge 2026-09-14 17:47:33 +02:00
ItemPickup.cs.meta Loot 2021-04-15 04:25:22 +01:00
RadiatorHardpoint.cs Heat System v2 + Lasers 2021-01-27 00:05:30 +00:00
RadiatorHardpoint.cs.meta Heat System v2 + Lasers 2021-01-27 00:05:30 +00:00
ShieldAnimation.cs Loot 2021-04-15 04:25:22 +01:00
ShieldAnimation.cs.meta Loot 2021-04-15 04:25:22 +01:00
ShieldEnvelope.cs Collapse the two implicit shield ellipsoids into ShieldEnvelope (Cut 2) 2026-09-18 06:33:38 +02:00
ShieldEnvelope.cs.meta Collapse the two implicit shield ellipsoids into ShieldEnvelope (Cut 2) 2026-09-18 06:33:38 +02:00
ShieldManager.cs Collapse the two implicit shield ellipsoids into ShieldEnvelope (Cut 2) 2026-09-18 06:33:38 +02:00
ShieldManager.cs.meta Loot 2021-04-15 04:25:22 +01:00
ShieldTest.cs Swap Unity.Mathematics usings for CultMath 2026-09-14 17:39:12 +02:00
ShieldTest.cs.meta Loot 2021-04-15 04:25:22 +01:00
ShipInstance.cs Switch engine asset references from Resources paths to Addressables GUIDs 2026-09-18 05:04:50 +02:00
ShipInstance.cs.meta Combat & Visibility & Collisions 2021-02-26 19:01:47 +00:00
ThrusterHardpoint.cs Weapon Scripting Overhaul 2021-01-25 05:53:36 +00:00
ThrusterHardpoint.cs.meta Weapon Scripting Overhaul 2021-01-25 05:53:36 +00:00
TimedDestroy.cs Restore the stable legacy Unity project 2026-08-10 14:57:50 +01:00
TimedDestroy.cs.meta Restore the stable legacy Unity project 2026-08-10 14:57:50 +01:00
TractorBeam.cs Restore the stable legacy Unity project 2026-08-10 14:57:50 +01:00
TractorBeam.cs.meta Loot 2021-04-15 04:25:22 +01:00
WeaponHardpoint.cs Weapon Scripting Overhaul 2021-01-25 05:53:36 +00:00
WeaponHardpoint.cs.meta Weapon Scripting Overhaul 2021-01-25 05:53:36 +00:00
Weapons.meta Weapon Scripting Overhaul 2021-01-25 05:53:36 +00:00