3 const float MIN_PLAYER_DISTANCE = 40;
6 float m_RadiusDecaySpeed;
13 float m_StregthFactor;
19 m_Player.GetAimingModel().SetCamShakeValues(0, 0);
23 void CameraShake(
float strength_factor,
float radius,
float smoothness,
float radius_decay_speed )
33 m_StregthFactor = strength_factor;
37 m_RadiusDecaySpeed = radius_decay_speed;
38 m_Smoothness = smoothness;
41 void Update(
float delta_time, out
float x_axis, out
float y_axis)
46 m_Radius -= delta_time * m_RadiusDecaySpeed;
48 if( m_RandomAngle >= 0 )
57 x_axis = m_RandomAngle * m_StregthFactor;
58 y_axis = m_RandomAngle * m_StregthFactor;