CMovement::PlaneNearFootPoints
function · collision · primitive
- Address
0x634960· 383 bytes, up to0x634ade- Signature
int __thiscall (CMovement *this, const float *plane)- Meaning
- Returns 1 when a plane passes within 1/720 of the position or of four raised corners of the unit
- Confidence
- verified, proof one
- Finding
- collision/airborne#wall-normal-from-contacts
- Test
collision::flush_probes_difftest
Finding: Wall normal from contacts in collision: airborne
0x634ae0(out, i, planes, count) picks the wall normal from the contact planes 0x632ba0
reported: count 3 or 4 gives triangle i's normal; 0, 1 or more than 4 give −planes[0].n. For 2,
c = planes[0].n × planes[1].n, normalized. It gives triangle i's normal when |c.z| < 2^-20, when
|c·n_i| < 2^-20, or when |c.z − 1| ≥ 2^-20 and 0x634960 finds i's plane within 1/720 of the
position or of a corner (x ± r, y ± r, z + 1.8493990·r). Else P = the point on all three planes
(0x634fc0), e = the edge of i nearest the line through P along c (0x634da0), w = c × e
normalized, and it returns −w when w·planes[0].n > 0, else w; −planes[0].n when |c × e| < 2^-22.
The derivation is in the doc.
Callers 1
- CMovement::ComputeWallNormal collision
Callees 2
- SetVector3 spline
- DotVector3 objectlayer
Calls and jumps by a bare address, from tables/calls.tsv.