benilla-re systems structs docs

CCamera::ClampAngles

function · uicamera · orchestration

Address
0x50d720 · 97 bytes, up to 0x50d780
Signature
void __thiscall (CCamera *this)
Meaning
Clamps the pitch to plus or minus 89 degrees and wraps the yaw and flip bias
Confidence
verified, proof one
Finding
uicamera/driver#turning-with-the-mouse

Finding: Turning with the mouse in uicamera: the follow camera

0x50fee0(dx, dy) turns the camera by a mouse step. It sets mode bit 6. The event's offsets arrive multiplied by the aspect constants K1 and K2 (0x766fb1; input#click-versus-drag), and 0x41ade0 divides them out, leaving the pixel offsets. The yaw step is cameraYawMoveSpeed in radians times dx times 0.00125 (1/800) and the pitch step is cameraPitchMoveSpeed in radians times dy times 1/600. The yaw is shifted by the negative of its step, the pitch by its step; mouseInvertYaw and mouseInvertPitch, when nonzero, flip the sign of the matching step. A positive pitch step looks down (uicamera/view#pitch-units-and-sign). The caller is the input control's motion handler 0x514400, which also commits the facing (uicamera/effects#committing-the-facing).

The derivation is in the doc.

Callers 2

Callees 1

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