Does the CD smoothing function - easy in | easy out / S shaped smoothing.
- Аргументы
-
val | actual value |
target | value we are reaching for -> Target |
velocity | float [1] - array of ONE member - some kind of memory and actual accel/decel rate, need to be zeroed when filter is about to be reset |
smoothTime | smoothing parameter, 0.1 .. 0.4 are resonable values, 0.1 is sharp, 0.4 is very smooth |
maxVelocity | maximal value change when multiplied by dt |
dt | delta time |
- Возвращает
float
smoothed/filtered value
val = EnfMath.SmoothCD(val, varTarget, valVelocity, 0.3, 1000, dt);
Используется в DayZPlayerImplementAiming::ApplyHorizontalNoise(), HitDirectionEffectBase::CalculateArrowPosition(), DayZPlayerCameraBase::HoldBreathFOVEffect(), HoldBreathFOVEffect(), DayZPlayerCameraBase::OnUpdate(), OnUpdate(), DayZPlayerImplementAiming::ProcessStealthFilters(), SmoothCDPI2PI(), StdFovUpdate(), NotificationUI::Update(), UpdateLRAngle(), UpdateLRAngleLookAt(), UpdateLRAngleUnlocked(), UpdateUDAngle() и UpdateUDAngleUnlocked().