diff --git a/src/AcDream.App/Input/PlayerMovementController.cs b/src/AcDream.App/Input/PlayerMovementController.cs index e941f69..c0012bd 100644 --- a/src/AcDream.App/Input/PlayerMovementController.cs +++ b/src/AcDream.App/Input/PlayerMovementController.cs @@ -204,21 +204,9 @@ public sealed class PlayerMovementController } } - // Slope compensation: on tilted terrain the character's collision - // cylinder extends horizontally beyond the center sample point. - // The lowest point of the cylinder is ~0.3 units below the center - // on steep slopes. Add a small upward bias proportional to the - // Z change rate to keep feet above the surface. Only when grounded. - if (!IsAirborne && result.IsOnGround) - { - // Sample Z 1 unit ahead and behind to estimate local gradient. - float aheadZ = _physics.Resolve( - new Vector3(result.Position.X + MathF.Cos(Yaw) * 1f, - result.Position.Y + MathF.Sin(Yaw) * 1f, newZ), - CellId, Vector3.Zero, StepUpHeight).Position.Z; - float gradient = MathF.Abs(aheadZ - newZ); - newZ += gradient * 0.4f; // 40% of the gradient as foot-radius compensation - } + // SampleZ now uses the correct triangle boundary conditions (fixed + // in 3ae7f5e via ACME WorldBuilder conformance test). No slope bias + // needed — the Z matches the visual terrain mesh exactly. Position = new Vector3(result.Position.X, result.Position.Y, newZ); CellId = result.CellId;