DayZ 1.30
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 строка 933

934 {
935 if (random_angle != 0 || random_interval != 0)
936 {
937 if (IsWiggling())
938 {
939 m_MaxOriWiggle = random_angle;
940 m_MaxOriInterval = random_interval;
941 return;
942 }
943
944 // We need the position to be accurate before storing it
945 Update();
946
947 // These are only ever used within the Wiggle API
948 // To restore the properties after wiggling
949 // So let's only set them within the Wiggle API c:
950
952 m_DefaultOri = GetLocalYawPitchRoll();
953 m_DefaultWorldPos = GetWorldPosition();
954 m_DefaultWorldOri = GetYawPitchRoll();
955 m_ForceOrientationRelativeToWorld = IsHierarchyPositionOnly();
956 }
957
958 super.SetWiggle(random_angle, random_interval);
959 }
vector GetLocalPosition()
Get the local position of the Effect.
Определения Effect.c:513
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().