EvaluateShake
function · uicamera · orchestration
- Address
0x511610· 194 bytes, up to0x5116d1- Signature
void __thiscall (void *this, NTempest::C3Vector *out, float facing, float amplitude, float time, float frequency, int type, float decay, int axis)- Meaning
- Adds one shake's damped sine to the offset along its axis
- Confidence
- verified, proof one
- Finding
- uicamera/effects#evaluating-one-shake
- Test
ui::cam_511610
Finding: Evaluating one shake in uicamera: shake, bobbing, terrain tilt and the drunk view
A shake's value is a = A * sin(2π * t * f) with A the cut amplitude, t the record time and f the frequency. When
the type is exactly 1, a is multiplied by exp(-t * k) with k the decay rate; any other type is flat until the
duration ends. Axis 0 adds (a cos φ, a sin φ, 0) to the offset, axis 1 adds the same turned by π/2, and axis 2 adds
a to the height. φ is the world facing of the followed unit, so turning rotates a shake in flight. Another axis
adds nothing.
The derivation is in the doc.
Callers 1
- CCamera::ApplyShakes uicamera
Callees 0
None by a direct call or jump.
Calls and jumps by a bare address, from tables/calls.tsv.