Fixed collision listener bug & incorrect transform forward. Added collision tags to raycasts. #274
|
@ -84,14 +84,27 @@ namespace SHADE
|
|||
{
|
||||
const SHCollisionInfo& C_INFO = *eventIter;
|
||||
|
||||
const bool CLEAR_EVENT = C_INFO.GetCollisionState() == SHCollisionInfo::State::EXIT || C_INFO.GetCollisionState() == SHCollisionInfo::State::INVALID;
|
||||
const bool INVALID_ENTITY = !SHEntityManager::IsValidEID(C_INFO.GetEntityA()) || !SHEntityManager::IsValidEID(C_INFO.GetEntityB());
|
||||
const bool INACTIVE_OBJECT = !SHSceneManager::CheckNodeAndComponentsActive<SHColliderComponent>(C_INFO.GetEntityA()) || !SHSceneManager::CheckNodeAndComponentsActive<SHColliderComponent>(C_INFO.GetEntityB());
|
||||
|
||||
if (CLEAR_EVENT || INVALID_ENTITY || INACTIVE_OBJECT)
|
||||
if (INVALID_ENTITY)
|
||||
{
|
||||
eventIter = container.erase(eventIter);
|
||||
continue;
|
||||
}
|
||||
else
|
||||
++eventIter;
|
||||
{
|
||||
const bool CLEAR_EVENT = C_INFO.GetCollisionState() == SHCollisionInfo::State::EXIT || C_INFO.GetCollisionState() == SHCollisionInfo::State::INVALID;
|
||||
|
||||
const bool INACTIVE_OBJECT = !SHSceneManager::CheckNodeAndComponentsActive<SHColliderComponent>(C_INFO.GetEntityA())
|
||||
|| !SHSceneManager::CheckNodeAndComponentsActive<SHColliderComponent>(C_INFO.GetEntityB());
|
||||
|
||||
if (CLEAR_EVENT || INACTIVE_OBJECT)
|
||||
{
|
||||
eventIter = container.erase(eventIter);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
++eventIter;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue