ComputeTrianglePushback
function · collision · primitive
- Address
0x634300· 85 bytes, up to0x634354- Signature
void __thiscall (void *this, float *out, const void *list, const float *dir, float dist, uint32_t index)- Meaning
- Writes -(n.dir)·dist·n for the normal n of a list's triangle
- Confidence
- verified, proof one
- Finding
- collision/resolve#free-move-slide
- Test
collision::resolve_state_difftest
Finding: Free-move slide in collision: resolve
After a hit, with T = float(ms) and U the time used, the call takes these steps:
| step | action |
|---|---|
| 1 | t = a/rem·(T − U), then rem −= a |
| 2 | t + 2^-20 > 1: U += t, stall count c = 1; else c += 1, ending at c > 5 |
| 3 | T − U < 1 ends |
| 4 | p = −(n·u)·rem·n (0x634300), n the normal of the triangle hit, in its list |
| 5 | m = u·rem + p, rem = float(|m|); rem < 2^-20 ends |
| 6 | u = float(m·(1/rem)), 1/rem kept at 53 bits (0x6348c5, 0x6348f5); sweep 0xc4e52c only, and loop as for the first sweep |
0x7c5cd0(0) runs at every end except a failed sweep, and, before any slide, a move without a
hit or a time end with |T − U| < 2^-20.
The derivation is in the doc.
Callers 1
- CMovement::ResolveFreeMove collision
Callees 0
None by a direct call or jump.
Calls and jumps by a bare address, from tables/calls.tsv.