s_cameraForwardXY
global · terrain
- Address
0xc7cfec· 8 bytes, up to0xc7cff3- Type
float[2]- Meaning
- Holds the x and y of the unit vector from the camera position to its target
- Confidence
- verified, proof one
- Finding
- terrain/cull#horizon-view
Finding: Horizon view in terrain: cull
Once a frame 0x680bc0 builds the matrix 0xc7b700 the horizon steps project through. The forward vector
f is the camera target less its position, normalised into 0xc7cfec to 0xc7cff4. When the squared length of f's x and y is above 0.0001
(0x680e50; a smaller, equal or NaN value takes identity), the matrix is the view looking from the origin along h = (f.x, f.y) normalised with up (0, 0, 1), then translated by
the negated camera position, then multiplied by the device projection 0xc7d280. A point so projected is seen by a level camera at the
eye with the real lens, and its z is the distance along the heading.
The derivation is in the doc.