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

◆ SetWiggle()

void Particle::SetWiggle ( float random_angle,
float random_interval )
inlineprivate

Makes the particle change direction by random_angle every random_interval seconds.

Заметки
This does not actually work on Particle with no parent, it should on ParticleSource
Calling SetWiggle(0,0) will effectively stop all wiggle functionality
Аргументы
random_anglefloat Will be the range [-random_angle, random_angle[ to wiggle between
random_intervalfloat Will be the time range [0, random_interval] to wiggle next time

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

776 {
777 if ( random_angle != 0 || random_interval != 0 )
778 {
779 m_MaxOriWiggle = random_angle;
780 m_MaxOriInterval = random_interval;
781
782 if ( !m_RandomizeOri )
784
785 if ( !m_RandomizeOri.IsRunning() ) // Makes sure the timer is NOT running already
786 m_RandomizeOri.Run( Math.RandomFloat(0, m_MaxOriInterval) , this, "RandomizeOrientation", null, false);
787 }
788 else
789 {
790 StopWiggle();
791 }
792 }
float m_MaxOriWiggle
Used for Wiggle API, Wiggle room [-m_MaxOriWiggle, m_MaxOriWiggle].
Определения Particle.c:40
float m_MaxOriInterval
Used for Wiggle API, Interval for wiggling [0, m_MaxOriInterval[.
Определения Particle.c:42
void StopWiggle()
Stops randomized wiggle.
Определения Particle.c:797
ref Timer m_RandomizeOri
Used for Wiggle API, calls the Wiggle functionality.
Определения Particle.c:44
const int CALL_CATEGORY_GAMEPLAY
Определения tools.c:10

Перекрестные ссылки CALL_CATEGORY_GAMEPLAY, m_MaxOriInterval, m_MaxOriWiggle, m_RandomizeOri, Math::RandomFloat() и StopWiggle().

Используется в Roadflare::DestroyParticle().