benilla-re systems structs docs

M2SceneCompareHits

function · models · primitive

Address
0x70a060 · 143 bytes, up to 0x70a0ee
Meaning
Orders two hit candidates by near distance, then far distance, then index
Confidence
verified, proof one
Finding
models/scene#segment-collision

Finding: Segment collision in models: the scene

0x7099e0(p0, p1, &f) finds the nearest collision triangle of the scene's hit-test instances on the segment within the fraction f, writes the hit's fraction to f and returns the instance's user value +0x41c, else 0. A segment or f under 1e-5 returns 0. Each listed, loaded instance is first a sphere: its current sequence's bounds, or the model's when that radius is 0, through the base matrix; the sphere must meet the line with its near point before the segment end and its far point not behind the start. Candidates sorted by near then far distance are tested while their near distance is under the best hit, and only mode 3 instances test triangles. Every call empties the hit list.

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 0

None by a direct call or jump.

Calls and jumps by a bare address, from tables/calls.tsv.