diff --git a/Assets/Scripts/Mechanics/GameOptimizer.cs b/Assets/Scripts/Mechanics/GameOptimizer.cs index d64fb56..9f03e5e 100644 --- a/Assets/Scripts/Mechanics/GameOptimizer.cs +++ b/Assets/Scripts/Mechanics/GameOptimizer.cs @@ -133,11 +133,15 @@ namespace Platformer.Mechanics if (!levelTilemap.HasTile(pos)) continue; // BT63 — Tile asset의 m_ColliderType=None = 배경 의도 (tree·plant·fence·house) = 자동 분류 제외 - // BT48 시점 + 나무 충돌 정정만 추가 (PD 명시 채택 2026-05-07). // 결과: 나무·plant·fence·house Tile은 Level 잔존·자체 None Collider로 자연 통과. var tileAsset = levelTilemap.GetTile(pos); if (tileAsset != null && tileAsset.colliderType == UnityEngine.Tilemaps.Tile.ColliderType.None) continue; + // BT68 — TileGround* (지면·벽 의도) 자동 분류 제외 (PD 보고 2026-05-08: "대각선 점프로 벽 통과") + // 결과: TileGround·TileGroundDark·TileGroundTop Tile은 Level 잔존·Layer 0 영구 충돌·통과 X. + string nm = tileAsset != null ? tileAsset.name : string.Empty; + if (nm.StartsWith("TileGround")) continue; + Vector3 worldPos = levelTilemap.CellToWorld(pos); bool aboveThreshold = worldPos.y >= airThresholdY; bool isSmallAir = !aboveThreshold && IsSmallAirPlatform(levelTilemap, pos, MAX_PLATFORM_WIDTH); diff --git a/Assets/Scripts/Mechanics/KinematicObject.cs b/Assets/Scripts/Mechanics/KinematicObject.cs index 24214ed..f87409c 100644 --- a/Assets/Scripts/Mechanics/KinematicObject.cs +++ b/Assets/Scripts/Mechanics/KinematicObject.cs @@ -160,9 +160,11 @@ namespace Platformer.Mechanics } else { - //We are airborne, but hit something, so cancel vertical up and horizontal velocity. - velocity.x *= 0; - velocity.y = Mathf.Min(velocity.y, 0); + // BT68 — X·Y 분리 처리 (PD 보고 2026-05-08: "전진 점프 시 앞 막혀도 위로 점프 가능 의무"): + // X 이동 시점 hit (앞 벽) → velocity.x만 0, velocity.y 보존 (점프 속도 유지) + // Y 이동 시점 hit (천장) → velocity.x·y 모두 cap (기존 동작) + velocity.x = 0; + if (yMovement) velocity.y = Mathf.Min(velocity.y, 0); } //remove shellDistance from actual move distance. var modifiedDistance = hitBuffer[i].distance - shellRadius;