DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ SmoothCD()

static proto float Math::SmoothCD ( float val,
float target,
inout float velocity[],
float smoothTime,
float maxVelocity,
float dt )
staticprivate

Does the CD smoothing function - easy in | easy out / S shaped smoothing.

Аргументы
valactual value
targetvalue we are reaching for -> Target
velocityfloat[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
smoothTimesmoothing parameter, 0.1 .. 0.4 are resonable values, 0.1 is sharp, 0.4 is very smooth
maxVelocitymaximal value change when multiplied by dt
dtdelta 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().