s_cameraSlopeLimit
global · uicamera
- Address
0x8089c0· 4 bytes, up to0x8089c3- Type
const float- Meaning
- Holds 0.349066, the limit the camera probe clamps its slope to, plus and minus
- Confidence
- verified, proof one
- Finding
- uicamera/effects#probing-the-slope
Finding: Probing the slope in uicamera: shake, bobbing, terrain tilt and the drunk view
Every 100 milliseconds 0x50d900(unit, now) measures the ground ahead of a unit. With the tilt off (0x5105a0 false) it stores 0 at +0xa0. Otherwise it casts a ray 10/3 yards forward along the facing from 5/3 yards above the feet,
backs the hit point off 5/18 yard, and casts a ray 64/9 yards straight down from there. The slope is the ground rise
over the horizontal distance. The slope's size picks the largest of ten table angles (0 to 45 degrees in steps of 5) whose
key it reaches; uphill gives a negative angle. The result is clamped to plus or minus 20 degrees and stored at +0xa0.
The derivation is in the doc.