benilla-re systems structs docs

BuildTransportMatrix

function · collision · orchestration

Address
0x630ac0 · 163 bytes, up to 0x630b62
Signature
void __thiscall (float *this, uint64_t transport)
Meaning
Writes a transport's rotation about z by its facing, then its translation, as a row-vector 4x4 matrix
Confidence
verified, proof one
Finding
collision/world#transport-matrix

Finding: Transport matrix in collision: world

0x630ac0(M, guid) writes the row-vector 4×4 matrix of the transport game object guid, mapping a transport-space point q to q·M. With t the vector the object's vtable slot +0x14 returns, and c and s the float cosine and sine of the angle slot +0x18 returns, the rows are:

rowvalues
0c, s, 0, 0
1−s, c, 0, 0
20, 0, k, 0
3t.x, t.y, t.z, 1

k = float(float(1 − c) + c) is one unit in the last place below 1.0 for some negative c. 0x468460 finds the object with the type mask 0x20, and no null test follows: a GUID naming no game object faults. The slots return the type handler's position and facing, or without a handler the descriptor's fields +0x24 and +0x30.

The derivation is in the doc.

Callers 10

Callees 3

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