From dd06f39dbcfe181843f775f1cf241936697439b4 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Thu, 15 Oct 2026 05:40:10 +0200 Subject: [PATCH] FloatingBodyTests: the tilt expectation is spelled from force and K, not read back from GetNormal Two hand mutants of GetNormal's K (ignored; times 3) survived because the test compared the ship's tilt with the same GetNormal it was testing. Co-Authored-By: Claude Opus 5.5 --- tests/Aetheria.Shared.Tests/FloatingBodyTests.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/Aetheria.Shared.Tests/FloatingBodyTests.cs b/tests/Aetheria.Shared.Tests/FloatingBodyTests.cs index b86ef459f..16e66c1b0 100644 --- a/tests/Aetheria.Shared.Tests/FloatingBodyTests.cs +++ b/tests/Aetheria.Shared.Tests/FloatingBodyTests.cs @@ -217,7 +217,9 @@ public sealed class FloatingBodyTests : IDisposable Assert.InRange(ship.Velocity.x, expected.x - tolerance, expected.x + tolerance); Assert.InRange(ship.Velocity.y, expected.y - tolerance, expected.y + tolerance); - var normal = zone.GetNormal(at); + // The tilt is the surface of the drawn height (potential / K): its slope is the force over K. + var slope = zone.GetForce(at) / zone.Settings.HeightExaggeration; + var normal = normalize(float3(slope.x, 1f, slope.y)); var q = ship.Rotation; var u = float3(q.x, q.y, q.z); var v = float3(0, 1, 0);