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

◆ IsCollidingGeometryProxy()

bool Hologram::IsCollidingGeometryProxy ( ItemBase action_item = null)
inlineprotected

См. определение в файле Hologram.c строка 589

590 {
591 if (CfgGameplayHandler.GetDisableIsCollidingBBoxCheck())
592 return false;
593
594 vector center;
595 vector relativeOffset; //we need to lift BBox, because it is calculated from the bottom of projection, and not from the middle
596 vector absoluteOffset = "0 0.05 0"; //we need to lift BBox even more, because it colliddes with house floors due to various reasons (probably geometry or float imperfections)
597 vector orientation = GetProjectionOrientation();
598 vector edgeLength;
599 vector minMax[2];
600 array<Object> excludedObjects = new array<Object>();
601 array<ref BoxCollidingResult> collidedObjects = new array<ref BoxCollidingResult>();
602
604 relativeOffset[1] = (minMax[1][1] - minMax[0][1]) * 0.5;
605 center = m_Projection.GetPosition() + relativeOffset + absoluteOffset;
606 edgeLength = GetCollisionBoxSize(minMax);
607 excludedObjects.Insert(m_Projection);
608 excludedObjects.Insert(m_Player);
609
610 if (action_item)
611 excludedObjects.Insert(action_item);
612
613 BoxCollidingParams params = new BoxCollidingParams();
614 params.SetParams(center, orientation, edgeLength, ObjIntersect.View, ObjIntersect.Geom, false);
615 bool isTrue = g_Game.IsBoxCollidingGeometryProxy(params, excludedObjects, collidedObjects);
616 #ifdef DIAG_DEVELOPER
617 if (DiagMenu.GetBool(DiagMenuIDs.MISC_HOLOGRAM))
618 {
619 string text = "";
620 foreach (BoxCollidingResult object: collidedObjects)
621 text += " | " + Object.GetDebugName(object.obj);
622
623 DebugLog("IsCollidingGeometryProxy: ", false, isTrue, text);
624
625 int color = 0x01FFFFFF;
626 if (isTrue)
627 color = 0x33F22613;
628
629 if (m_CollisionBox)
631 DrawDebugCollisionBox(minMax, color);
632 }
633 #endif
634
635 return isTrue;
636 }
void DrawDebugCollisionBox(vector min_max[2], int color)
Определения Construction.c:1170
Shape m_CollisionBox
Определения Construction.c:19
void DestroyDebugCollisionBox()
Определения Construction.c:1181
DayZGame g_Game
Определения DayZGame.c:3942
DiagMenuIDs
Определения EDiagMenuIDs.c:2
proto native void SetParams(vector center, vector orientation, vector edgeLength, ObjIntersect primaryType, ObjIntersect secondaryType, bool fullComponentInfo)
Set the parameters.
vector GetCollisionBoxSize(vector min_max[2])
Определения Hologram.c:1078
EntityAI m_Projection
Определения Hologram.c:22
PlayerBase m_Player
Определения Hologram.c:23
vector GetProjectionOrientation()
Определения Hologram.c:1502
void GetProjectionCollisionBox(out vector min_max[2])
Определения Hologram.c:1067
class LOD Object

Перекрестные ссылки DestroyDebugCollisionBox(), DrawDebugCollisionBox(), g_Game, DiagMenu::GetBool(), GetCollisionBoxSize(), CfgGameplayHandler::GetDisableIsCollidingBBoxCheck(), GetProjectionCollisionBox(), GetProjectionOrientation(), m_CollisionBox, m_Player, m_Projection и BoxCollidingParams::SetParams().

Используется в EvaluateCollision().