1427 {
1428 vector from = position;
1429 vector ground;
1430 vector player_to_projection_vector;
1432
1434
1435 vector to = from + ground;
1436 vector contact_pos = to;
1437
1438 RaycastRVParams rayInput =
new RaycastRVParams(from, to,
m_Projection);
1440 array<ref RaycastRVResult> results = new array<ref RaycastRVResult>;
1441
1442 if (DayZPhysics.RaycastRVProxy(rayInput, results))
1443 {
1444 RaycastRVResult res;
1445 for (int i = 0; i < results.Count(); i++)
1446 {
1447 res = results.Get(i);
1449 {
1450 contact_pos = res.
pos;
1451 break;
1452 }
1453 }
1454 }
1455
1456
1457 if (contact_pos != "0 0 0")
1458 {
1459 vector check_pos;
1460 vector check_dir;
1461 int check_component = -1;
1462 set<Object> hit_object = new set<Object>;
1463 to = contact_pos;
1464 to[1] = to[1] + 0.1;
1466
1467 if (DayZPhysics.RaycastRV(from, to, check_pos, check_dir, check_component, hit_object, null,
m_Player,
false,
false, ObjIntersectFire))
1468 {
1469 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))))
1470 {
1471 contact_pos = "0 0 0";
1472 }
1473 }
1474 }
1475
1477
1478 return contact_pos;
1479 }
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.