541 {
542 if (CfgGameplayHandler.GetDisableIsCollidingBBoxCheck())
543 return false;
544
545 vector center;
546 vector relativeOffset;
547 vector absoluteOffset = "0 0.05 0";
549 vector edgeLength;
550 vector minMax[2];
551 array<Object> excludedObjects = new array<Object>();
552 array<Object> collidedObjects = new array<Object>();
553
555 relativeOffset[1] = (minMax[1][1] - minMax[0][1]) * 0.5;
556 center =
m_Projection.GetPosition() + relativeOffset + absoluteOffset;
560
561 if (action_item)
562 excludedObjects.Insert(action_item);
563
564
565
566 bool isTrue =
GetGame().
IsBoxCollidingGeometry(center, orientation, edgeLength, ObjIntersectFire, ObjIntersectGeom, excludedObjects, collidedObjects);
567 #ifdef DIAG_DEVELOPER
569 {
570 string text = "";
571 foreach (
Object object: collidedObjects)
572 text +=
" | " +
Object.GetDebugName(
object);
573
574 DebugText("IsCollidingBBox: ", false, isTrue, text);
575
576 int color = 0x01FFFFFF;
577 if (isTrue)
578 color = 0x33F22613;
579
581 }
582 #endif
583
584 return isTrue;
585 }
void DrawDebugCollisionBox(vector min_max[2], int color)
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)
vector GetCollisionBoxSize(vector min_max[2])
vector GetProjectionOrientation()
void GetProjectionCollisionBox(out vector min_max[2])
proto native CGame GetGame()