"Zero-radius Scene.Trace.Ray slips through coarse voxel ModelColliders"
▸ SYMPTOM
A Scene.Trace.Ray aimed at runtime-generated voxel terrain (a ModelCollider built from greedy-meshed quads) returns Hit=false every time. The ray's origin, direction, and target are all correct -- other traces on the same ray with a radius hit fine. The feature (grapple hook, interact raycast, projectile hit-scan) appears completely broken against terrain while working against other colliders.
▸ CAUSE
A zero-radius Scene.Trace.Ray slips straight through the coarse voxel ModelCollider. The physics engine's line-vs-triangle-mesh raycast can miss coplanar or degenerate greedy-mesh seams that a swept sphere cannot. The greedy mesher produces large merged quads with shared edges; a mathematically thin ray can thread the gap.
The false-confidence trap: the editor MCP scene_trace tool (also zero-radius) may HIT the exact ray the in-game trace MISSES. Do not trust an editor-side trace to predict what an in-game Scene.Trace.Ray does against a runtime mesh collider -- reproduce in game code.
▸ FIX
Add a small radius to any ray that traces against runtime-generated mesh colliders:
var tr = Scene.Trace
.Ray(origin, origin + dir * maxDist)
.Radius(0.12f * UnitsPerMeter) // hook-thick sphere sweep
.Run();A radius of ~0.1-0.15 m (in your unit scale) is enough to catch ledges and edges while remaining aim-forgiving. Check your existing terrain traces -- any that already carry a radius (camera boom, ground probe) work fine; only zero-radius traces are affected.
To isolate whether a failing trace is a radius issue, run three traces on the identical ray in one frame:
var line = Scene.Trace.Ray(ray).Run();
var sphere = Scene.Trace.Ray(ray).Radius(0.1f * M).Run();
// line.Hit=false, sphere.Hit=true => radius issue▸ WHY IT WORKS
A swept sphere has a cross-section that bridges the sub-triangle seams in the greedy mesh. The physics engine's sphere-vs-trimesh sweep is a fundamentally different code path from the line raycast and does not have the same degenerate-edge sensitivity. The small radius adds negligible cost and makes the trace geometrically robust against any mesh topology.