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

◆ IsBoxCollidingGeometry()

proto native bool CGame::IsBoxCollidingGeometry ( vector center,
vector orientation,
vector edgeLength,
int iPrimaryType,
int iSecondaryType,
array< Object > excludeObjects,
array< Object > collidedObjects = NULL )
protected

Finds all objects with geometry iType that are in choosen oriented bounding box (OBB)

Аргументы
centervector, center of OBB
orientationvector, direction (front vector), used for calculation of OBB rotation
edgeLengthvector, sizes of whole box
iPrimaryTypeint, type of intersection, possible values ObjIntersectFire(0), ObjIntersectView(1), ObjIntersectGeom(2), ObjIntersectIFire(3), ObjIntersectNone(4)
iSecondaryTypeint, type of intersection, possible values ObjIntersectFire(0), ObjIntersectView(1), ObjIntersectGeom(2), ObjIntersectIFire(3), ObjIntersectNone(4)
excludeObjectsarray<Object>, objects that should be excluded from collision check
collidedObjectsarray<Object>, out parameter, objects that collided with OBB
Возвращает
bool, true if at least one object collided with OBB, false otherwise
vector orientation = GetOrientation();
vector size = "10 4 8";
array<Object> excluded_objects = new array<Object>;
excluded_objects.Insert(this);
array<Object> nearby_objects = new array<Object>;
if(GetGame().IsBoxCollidingGeometry( pos, orientation, size, ObjIntersectView, ObjIntersectGeom, excluded_objects, nearby_objects))
{
for (int i = 0, c = nearby_objects.Count(); i < c; ++i)
{
PrintString("object " + i.ToString());
}
}
vector GetOrientation()
Определения AreaDamageManager.c:306
proto native bool IsBoxCollidingGeometry(vector center, vector orientation, vector edgeLength, int iPrimaryType, int iSecondaryType, array< Object > excludeObjects, array< Object > collidedObjects=NULL)
Finds all objects with geometry iType that are in choosen oriented bounding box (OBB)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Определения EnConvert.c:106
proto native CGame GetGame()
void PrintString(string s)
Helper for printing out string expression. Example: PrintString("Hello " + var);.
Определения EnScript.c:345
class JsonUndergroundAreaTriggerData GetPosition
Определения UndergroundAreaLoader.c:9

Используется в Hologram::IsCollidingBBox() и BaseBuildingBase::PerformRoofCheckForBase().