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

◆ CalculateCloudEffectPosRot()

void DustEffectManager::CalculateCloudEffectPosRot ( out vector cloudPositon,
out vector cloudRotation )
inlineprotected

См. определение в файле DustEffectsManager.c строка 387

388 {
389 vector wind = GetGame().GetWeather().GetWind();
390 float windStr = wind.Normalize();
391
392 //Rotation calculation
393 vector rotation = wind;
394
395 rotation[1] = rotation[2];
396 float yaw = rotation.VectorToYaw();
397
398 rotation[0] = -yaw;
399 rotation[1] = 0;
400 rotation[2] = 0;
401 //End Roration calculation
402
403 //Position calculation
404 vector playerSpeed = GetPlayerSpeed();
405
406 float playerSpeedStr = playerSpeed.Normalize();
407 float CloudEffectDistance = m_CloudEffectBaseDistance;
408
409 vector pos = -(wind * m_CloudEffectBaseDistance);
410 pos = pos + (playerSpeed * playerSpeedStr * CLOUD_EFFECT_SPEED_ADJUSTMENT);
412 //End position calculation
413
414
415 cloudPositon = pos;
416 cloudRotation = rotation;
417 }
const float CLOUD_EFFECT_ORIGIN_HEIGHT
Определения DustEffectsManager.c:46
vector GetPlayerSpeed()
Определения DustEffectsManager.c:341
const float CLOUD_EFFECT_SPEED_ADJUSTMENT
Определения DustEffectsManager.c:47
float m_CloudEffectBaseDistance
Определения DustEffectsManager.c:18
proto float Normalize()
Normalizes vector. Returns length.
proto float VectorToYaw()
Returns yaw of vector.
DayZGame GetGame()
Определения gameplay.c:636

Перекрестные ссылки CLOUD_EFFECT_ORIGIN_HEIGHT, CLOUD_EFFECT_SPEED_ADJUSTMENT, GetGame(), GetPlayerSpeed(), m_CloudEffectBaseDistance, vector::Normalize() и vector::VectorToYaw().

Используется в CreateCloudEffect() и UpdateActiveCloudEffect().