diff --git a/src/AcDream.Core/Physics/TransitionTypes.cs b/src/AcDream.Core/Physics/TransitionTypes.cs index bfd62fa..1774313 100644 --- a/src/AcDream.Core/Physics/TransitionTypes.cs +++ b/src/AcDream.Core/Physics/TransitionTypes.cs @@ -774,11 +774,14 @@ public sealed class Transition return TransitionState.Adjusted; } - // Rewind the sphere to the contact point (before penetration). + // Rewind the sphere to just BEFORE the contact point. + // Use t slightly before bestT to ensure no penetration. if (bestT < 1f) { - Vector3 contactPos = currPos + movement * bestT; - contactPos += bestNormal * 0.005f; + float safeT = MathF.Max(0f, bestT - 0.02f); + Vector3 contactPos = currPos + movement * safeT; + // Additional push along normal to clear the surface. + contactPos += bestNormal * 0.02f; sp.SetCheckPos(contactPos, sp.CheckCellId); }