1106 {
1109
1111
1114 int contactComponent;
1115 set<Object> objects = new set<Object>;
1116
1117 if (
DayZPhysics.
RaycastRV(from, to, contactPos, contactDir, contactComponent, objects, NULL, entity,
false,
false, geometry, 0.25))
1118 {
1119 for (int i = 0; i < objects.Count(); ++i)
1120 {
1121 Object obj = objects.Get(i);
1122 if (!obj)
1123 continue;
1124
1125 if (excludedTypes && excludedTypes.Count())
1126 {
1127 foreach (typename excludedType: excludedTypes)
1128 {
1129 if (obj.IsInherited(excludedType))
1130 return false;
1131 }
1132 }
1133
1134 hitObj = obj;
1135 return true;
1136 }
1137 }
1138
1139 return false;
1140 }
static void IsUnderRoofFromToCalculation(EntityAI entity, out vector from, out vector to, float height=GameConstants.ROOF_CHECK_RAYCAST_DIST)
static proto bool RaycastRV(vector begPos, vector endPos, out vector contactPos, out vector contactDir, out int contactComponent, set< Object > results=NULL, Object with=NULL, Object ignore=NULL, bool sorted=false, bool ground_only=false, int iType=ObjIntersectView, float radius=0.0, CollisionFlags flags=CollisionFlags.NEARESTCONTACT)
Raycasts world by given parameters.