1378 {
1379 vector from = position;
1380 vector ground;
1381 vector player_to_projection_vector;
1383
1385
1386 vector to = from + ground;
1387 vector contact_pos = to;
1388
1389 RaycastRVParams rayInput =
new RaycastRVParams(from, to,
m_Projection);
1391 array<ref RaycastRVResult> results = new array<ref RaycastRVResult>;
1392
1393 if (DayZPhysics.RaycastRVProxy(rayInput, results))
1394 {
1395 RaycastRVResult res;
1396 for (int i = 0; i < results.Count(); i++)
1397 {
1398 res = results.Get(i);
1400 {
1401 contact_pos = res.
pos;
1402 break;
1403 }
1404 }
1405 }
1406
1407
1408 if (contact_pos != "0 0 0")
1409 {
1410 vector check_pos;
1411 vector check_dir;
1412 int check_component = -1;
1413 set<Object> hit_object = new set<Object>;
1414 to = contact_pos;
1415 to[1] = to[1] + 0.1;
1417
1418 if (DayZPhysics.RaycastRV(from, to, check_pos, check_dir, check_component, hit_object, null,
m_Player,
false,
false, ObjIntersectFire))
1419 {
1420 if ((hit_object.Count() > 0)&& (!hit_object[0].IsInherited(Watchtower) || (hit_object[0].IsInherited(Watchtower) && (
m_WatchtowerIgnoreComponentNames.Find(hit_object[0].GetActionComponentName(check_component, LOD.NAME_VIEW)) == -1))))
1421 {
1422 contact_pos = "0 0 0";
1423 }
1424 }
1425 }
1426
1428
1429 return contact_pos;
1430 }
vector HideWhenClose(vector pos)
const float SMALL_PROJECTION_GROUND
float GetProjectionDiameter()
ref array< string > m_WatchtowerIgnoreComponentNames
Object obj
object,that we collide with (NULL if none), If hierLevel > 0 object is the proxy object
bool entry
is false if begining point was TriggerInsider
vector pos
position of collision (in world coord)
Object parent
if hierLevel > 0 most parent of the proxy object
proto native vector Vector(float x, float y, float z)
Vector constructor from components.