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

◆ IsBoxColliding()

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

Finds all objects 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
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
Заметки
Object that doesn't have collision geometry will be ignored, as this only uses geometry
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(g_Game.IsBoxColliding( pos, orientation, size, excluded_objects, nearby_objects))
{
for (int i = 0, c = nearby_objects.Count(); i < c; ++i)
{
PrintString("object " + i.ToString());
}
}
vector GetOrientation()
Определения AreaDamageManager.c:306
DayZGame g_Game
Определения DayZGame.c:3942
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Определения EnConvert.c:119
class array< Class T > PrintString
vector GetPosition()
Get the world position of the Effect.
Определения Effect.c:473