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

◆ DoMeasurement()

void ItemBase::DoMeasurement ( )
inlineprotected

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

32 {
33 float dispersion = 80;
34
35 vector from = GetPosition() + ( GetMemoryPointPos("beamStart") + ((GetOrientation()+Vector(90,0,0)).AnglesToVector()*0.3) );
36 vector ori = GetOrientation() + Vector(90,0,0) + Vector(dispersion/2 - Math.RandomFloat(0, dispersion) , dispersion/2 - Math.RandomFloat(0, dispersion) , dispersion/2 - Math.RandomFloat(0, dispersion) );
37 vector to = from + (ori.AnglesToVector() )* 30;
38 vector contact_pos;
39 vector contact_dir;
40 int contactComponent;
41
42 bool is_collision = DayZPhysics.RaycastRV( from, to, contact_pos, contact_dir, contactComponent, NULL , NULL, GetHierarchyRootPlayer(), false, false, ObjIntersectIFire);
43
44 if (is_collision)
45 {
46 vector hit_normal = contact_dir.VectorToAngles();
47 hit_normal[1] = hit_normal[1] + 90;
48
49 // Generate result
50 Particle p = ParticleManager.GetInstance().PlayInWorld(ParticleList.DEBUG_DOT, contact_pos);
51 p.SetOrientation(hit_normal);
52 }
53 }
vector GetOrientation()
Определения AreaDamageManager.c:306
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
Определения ParticleManager.c:88
proto vector VectorToAngles()
Converts vector to spherical coordinates with radius = 1.
proto vector AnglesToVector()
Converts spherical coordinates (yaw, pitch, roll in degrees) to unit length vector.
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
class JsonUndergroundAreaTriggerData GetPosition
Определения UndergroundAreaLoader.c:9

Перекрестные ссылки vector::AnglesToVector(), ParticleList::DEBUG_DOT, GetOrientation(), GetPosition, ParticleManager(), Math::RandomFloat(), DayZPhysics::RaycastRV(), Vector() и vector::VectorToAngles().

Используется в PrepareMeasurement().