Files
jesse c297b20aed Disable PA on/off ramps; restore mainline to pre-ramp state
Three iterations of the Daikoku PA ramps never read as a real
interchange. Measured why, rather than tuning further:

  * the entry and exit decks INTERSECTED -- 2547 sample pairs within
    30 studs horizontally at <12 studs dY, worst case 0.5 studs apart
    at dY=0.0. On screen that is the bowtie tangle of white rails.
  * both real Daikoku ramps turn the SAME way (clockwise; the guide
    video says "right, right"). This build mirrored them into each
    other.
  * the real arc wraps OUTSIDE the lot and forms its north/east
    boundary. This build cut across the apron interior.

Gated behind BUILD_PA_RAMPS=false rather than deleted -- the radius
was already correct (470 studs vs an OSM-measured mean of 469) and
the merge lands tangent at 0.1-0.2 deg divergence. Both worth keeping.

Also removed two leftovers that would have outlived the ramps:

  * rampOpen punched holes in the mainline's outer parapet, railing
    and kill wall for ramps that no longer exist -- a barrier gap with
    a drop behind it. Sealed via RAMP_EDGE_OPENINGS=false. Verified:
    Barrier/EdgeRail/KillWall = 1646 each = 823 samples x 2 edges,
    0 road samples without a guard within 90 studs.
  * gore zebra hatching painted 1024 bars + 64 boundary lines marking
    a junction that is not there. Sealed via RAMP_GORE_MARKINGS=false.

Verified after a cache-busting fresh rebuild (Studio's require() cache
otherwise serves the previous map and reports a false pass):
  parts 22628 -> 15988
  all ramp part classes = 0
  Road = 823 (unchanged), spawn pad + PASpawn intact
  clip probe TRUSTWORTHY (control +11/-0), CLIPPING=0

Research and rebuild spec kept for when this is revisited:
reference/ramps/BUILD_SPEC.md, INDEX.md (10 CC-licensed Commons
photos), docs/daikoku-reference-spec.md (OSM circle fits).
2026-08-03 21:15:25 -04:00

92 lines
2.2 KiB
Luau

-- Why did the building-clip probe return 0 with a 0 control? Diagnose the metric.
local ws = game:GetService("Workspace")
local map = ws:FindFirstChild("Map")
local BUILDING = {
Building = true,
TokyoTower = true,
TowerDeck = true,
TowerAntenna = true,
ShiodomeTower = true,
TowerCrown = true,
DietTower = true,
RoppongiHills = true,
TokyoStation = true,
StationDome = true,
Skytree = true,
GinzaBlock = true,
NationalDiet = true,
BridgeTower = true,
TowerCrossbeam = true,
Structure = true,
PalaceWall = true,
}
local ramp, bld = {}, {}
local anyQueryOff, anyCollideOff = 0, 0
for _, d in ipairs(ws:GetDescendants()) do
if d:IsA("BasePart") then
if d.Name:find("PAEntryRamp") or d.Name:find("PAExitRamp") then
table.insert(ramp, d)
elseif BUILDING[d.Name] then
table.insert(bld, d)
if not d.CanQuery then
anyQueryOff += 1
end
if not d.CanCollide then
anyCollideOff += 1
end
end
end
end
if #bld == 0 then
return "NO building parts found in Workspace at all (name set wrong?)"
end
-- nearest building to the ramp chain (subsample ramps for speed)
local bd, br, bb = math.huge, nil, nil
for i = 1, #ramp, 7 do
local r = ramp[i]
for _, b in ipairs(bld) do
local dd = (r.Position - b.Position).Magnitude
if dd < bd then
bd, br, bb = dd, r, b
end
end
end
-- how many buildings are anywhere near the PA at all?
local cen = Vector3.new(-4128, 81, -7438)
local near2000 = 0
for _, b in ipairs(bld) do
if (b.Position - cen).Magnitude < 2000 then
near2000 += 1
end
end
-- does the raw overlap API return ANYTHING for a ramp part? (metric sanity)
local op = OverlapParams.new()
op.MaxParts = 50
local sample = ramp[math.floor(#ramp / 2)]
local hits = ws:GetPartBoundsInBox(sample.CFrame, sample.Size * 1.2, op)
local hn = {}
for i = 1, math.min(#hits, 8) do
table.insert(hn, hits[i].Name)
end
return ("buildings=%d (CanQuery off=%d, CanCollide off=%d) | nearestBldToRamp=%.0f (%s -> %s @%.0f,%.0f,%.0f) | bldWithin2000ofPA=%d | overlapSanity hits=%d [%s]"):format(
#bld,
anyQueryOff,
anyCollideOff,
bd,
br and br.Name or "nil",
bb and bb.Name or "nil",
bb and bb.Position.X or 0,
bb and bb.Position.Y or 0,
bb and bb.Position.Z or 0,
near2000,
#hits,
table.concat(hn, ",")
)