ShakeFalloff
function · uicamera · primitive
- Address
0x5116e0· 123 bytes, up to0x51175a- Signature
bool __thiscall (void *this, const NTempest::C3Vector *eye, const NTempest::C3Vector *position, float *amplitude, float near, float nearSquared, float unused, float farSquared)- Meaning
- Cuts a shake's amplitude by distance and answers whether it is in range
- Confidence
- verified, proof one
- Finding
- uicamera/effects#distance-falloff
- Test
ui::dist2_5116e0
Finding: Distance falloff in uicamera: shake, bobbing, terrain tilt and the drunk view
0x5116e0(eye, shakePosition, &litude, 9, 81, 80, 6400) scales the amplitude by distance. Past 80 yards (squared
distance over 6400) it answers 0 and the record is skipped for the frame. Within 9 yards (squared distance of 81 or less) it
answers 1 with the amplitude untouched. Between, the amplitude is multiplied by 0.7 ^ ((d - 9) / 9) with d the
distance, and it answers 1. The base is the float 0.7 widened to a double, 0.699999988079071.
The derivation is in the doc.
Callers 1
- CCamera::ApplyShakes uicamera
Callees 1
- __CIpow crt
Calls and jumps by a bare address, from tables/calls.tsv.