32 {
33 float dispersion = 80;
34
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) );
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 {
47 hit_normal[1] = hit_normal[1] + 90;
48
49
50 Particle p =
ParticleManager.GetInstance().PlayInWorld(ParticleList.DEBUG_DOT, contact_pos);
51 p.SetOrientation(hit_normal);
52 }
53 }
void ParticleManager(ParticleManagerSettings settings)
Constructor (ctor)
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