benilla-re systems structs docs

CCamera::SolveLimits

function · uicamera · primitive

Address
0x50e570 · 857 bytes, up to 0x50e8c8
Signature
uint32_t __thiscall (CCamera *this, float *pivot, float *distance, float *height, float *offset, float band)
Meaning
Solves the distance and pivot height that clear the world
Confidence
verified, proof one
Finding
uicamera/solver#the-solver
Test
ui::cam_50e570

Finding: The solver in uicamera: the near and far solver and the water bands

0x50e570(pivot, &distance, &height, offset, band) gives the largest distance and pivot height that clear the world. Both start from the larger of target and live values: the distance from +0x198 and +0xec, the height from +0x1c8 and +0xfc. The trace mask is 0x100171, plus 0xf0000 when cameraWaterCollision is set; the same register enables the water bands below. A vertical probe upward from the pivot plus a base height of 5/6 yard (more in the surface band) shortens the height, which is then clamped between that base and a cap. The cap is normally the live height +0xfc. A height within 2^-20 of the near clip skips the probe and the band limits.

The derivation is in the doc.

Callers 1

Callees 3

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