Files
tokyo-wangan-racing/tools/probe_mainbend.luau
T
jesse 6e50f9718d
CI / quality (push) Failing after 1m9s
Aux-lane suppression + PA geometry fixes; probe/verify tooling
MapBuilder.luau
  - Suppress the aux lane across samples 525-550 (AUX_SUPPRESS_FROM/TO),
    honoring the user's hand deletion in Studio so a rebuild no longer
    regenerates it.
  - Smoothstep the width ramp over AUX_BLEND=5 samples on each side. A hard
    cut produced a 26-stud lateral fence jog; the blend removes it.
  - DO NOT remove this suppression. Re-enabling it resurrects geometry the
    user deleted by hand.

rokit.toml
  - rojo 7.5.1 -> 7.7.0 to match the auto-updating Studio plugin.
    Server older than plugin fails the handshake with
    "attempt to index number with 'protocolVersion'".

tools/
  - 34 read-only probe/verify/capture scripts used to measure the datamodel
    instead of reasoning from source.

Verified-good baseline at this commit:
  total parts       16788
  PAWestSlip        60 segs, 34.4 deg total bend, worst 1.4, 0 kinks >5
  PAEastSlip        60 segs, 30.7 deg total bend, worst 1.3, 0 kinks >5
  AuxLane parts     30 (samples 525-550 deliberately absent)
  barrier coverage  823 samples, 0 unguarded
  fence jogs >10st  0
2026-08-06 08:27:47 -04:00

62 lines
2.2 KiB
Luau

-- East slip kinks hard at segs 6,7,11,12 (27.8/17.5/58.2/50.1 deg). The slip
-- follows the mainline via centreAt(f), so either (a) the mainline bends
-- viciously at those samples, or (b) the slip's own path math misbehaves.
-- East runs join=551 -> land=539 (backwards, span=-12); west runs 525 -> 537.
-- Sample the mainline heading across BOTH spans to tell which.
local out = {}
local function say(s) table.insert(out, s) end
local map = workspace:FindFirstChild("Map")
if not map then return "Map MISSING" end
local deck = {}
for _, d in ipairs(map:GetDescendants()) do
if d:IsA("BasePart") then
local k = d.Name:match("^Road_(%d+)$") or d.Name:match("^Deck_(%d+)$")
or d.Name:match("^RoadDeck_(%d+)$")
if k then table.insert(deck, { i = tonumber(k), p = d.Position, cf = d.CFrame }) end
end
end
table.sort(deck, function(a, b) return a.i < b.i end)
local byIdx = {}
for _, d in ipairs(deck) do byIdx[d.i] = d end
say(("mainline parts=%d idx %d..%d"):format(#deck, deck[1].i, deck[#deck].i))
local function report(lo, hi, label)
say(("--- mainline heading, samples %d..%d (%s) ---"):format(lo, hi, label))
local prev, acc = nil, 0
local worst, worstAt = 0, -1
for i = lo, hi do
local d = byIdx[i]
if d then
local h = d.cf.LookVector
if prev then
local dth = math.deg(math.acos(math.clamp(prev:Dot(h), -1, 1)))
acc += dth
if dth > worst then worst = dth; worstAt = i end
if dth > 4 then
say((" sample %d: turn %.1fdeg at (%.0f,%.0f,%.0f)"):format(i, dth, d.p.X, d.p.Y, d.p.Z))
end
end
prev = h
end
end
say((" total=%.1fdeg worst=%.1fdeg@%d"):format(acc, worst, worstAt))
end
report(525, 537, "WEST slip span - smooth one")
report(539, 551, "EAST slip span - ugly one")
-- Also: does the east span cross the sample-wrap boundary or reverse direction?
say("--- endpoint geometry ---")
for _, pair in ipairs({ { 525, 537, "west" }, { 551, 539, "east" } }) do
local a, b = byIdx[pair[1]], byIdx[pair[2]]
if a and b then
local straight = (Vector3.new(a.p.X, 0, a.p.Z) - Vector3.new(b.p.X, 0, b.p.Z)).Magnitude
say(("%s: join@%d=(%.0f,%.0f) land@%d=(%.0f,%.0f) straightDist=%.0f"):format(
pair[3], pair[1], a.p.X, a.p.Z, pair[2], b.p.X, b.p.Z, straight))
end
end
return table.concat(out, "\n")