benilla-re systems structs docs

CMovement::ComputeWallPush

function · collision · primitive

Address
0x635090 · 270 bytes, up to 0x63519d
Signature
float * __thiscall (CMovement *this, float *out, const float *dir, float allowed, float length, uint32_t index, const float *planes, uint32_t count)
Meaning
Writes the horizontal push that undoes a remaining move's part into a wall normal
Confidence
verified, proof one
Finding
collision/airborne#horizontal-wall-push
Test
collision::ground_slide_difftest

Finding: Horizontal wall push in collision: airborne

0x635090(out, u, a, L, i, planes, count) writes a horizontal push for the remaining move v = u·(L − a). The wall normal w is 0x634ae0's when the hit triangle i is steep (0x6336a0), else −planes[0].n. With ĥ = w.xy/|w.xy|, or w.xy itself when |w.xy| < 2^-22, q = −(w·u)·(L − a) / (w.y·ĥ.y + ĥ.x·w.x + w.z·0.0), undivided when that denominator is below 2^-22, and out = (ĥ.x·q, ĥ.y·q). For |w.xy| ≥ 2^-22 this is −(w·v)·w.xy/|w.xy|²: the move's part into w undone by horizontal motion alone. 0x635600 adds it to x and y only.

The derivation is in the doc.

Callers 1

Callees 3

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