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

◆ SetWiggle()

override void ParticleSource::SetWiggle ( float random_angle,
float random_interval )
inlineprotected

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
Аргументы
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

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

930 {
931 if (random_angle != 0 || random_interval != 0)
932 {
933 if (IsWiggling())
934 {
935 m_MaxOriWiggle = random_angle;
936 m_MaxOriInterval = random_interval;
937 return;
938 }
939
940 // We need the position to be accurate before storing it
941 Update();
942
943 // These are only ever used within the Wiggle API
944 // To restore the properties after wiggling
945 // So let's only set them within the Wiggle API c:
946
948 m_DefaultOri = GetLocalYawPitchRoll();
949 m_DefaultWorldPos = GetWorldPosition();
950 m_DefaultWorldOri = GetYawPitchRoll();
951 m_ForceOrientationRelativeToWorld = IsHierarchyPositionOnly();
952 }
953
954 super.SetWiggle(random_angle, random_interval);
955 }
vector GetLocalPosition()
Get the local position of the Effect.
Определения Effect.c:488
vector m_DefaultPos
Used for Wiggle API, to restore after unparenting.
Определения Particle.c:33
vector m_DefaultWorldOri
Used for Wiggle API, to restore after unparenting.
Определения Particle.c:35
vector m_DefaultOri
Used for Wiggle API, to restore after unparenting.
Определения Particle.c:31
bool m_ForceOrientationRelativeToWorld
Used for Wiggle API, to restore after unparenting.
Определения Particle.c:29
vector m_DefaultWorldPos
Used for Wiggle API, to restore after unparenting.
Определения Particle.c:37
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
bool IsWiggling()
Checks if particle is currently wiggling.
Определения Particle.c:763
proto native volatile void Update()
Определения PlayerSoundManager.c:125

Перекрестные ссылки GetLocalPosition(), Particle::IsWiggling(), Particle::m_DefaultOri, Particle::m_DefaultPos, Particle::m_DefaultWorldOri, Particle::m_DefaultWorldPos, Particle::m_ForceOrientationRelativeToWorld, Particle::m_MaxOriInterval, Particle::m_MaxOriWiggle и Update().

Используется в OnParticleUnParented() и PMTPlayback::TestWiggleStress().