Skip to content
Snippets Groups Projects
Commit 6b182327 authored by D-AIRY's avatar D-AIRY
Browse files

Fixed entity's bounding box in editor

parent 07e3e353
Branches
Tags
No related merge requests found
......@@ -123,13 +123,17 @@ void CEditorObject::setOrient(const SMQuaternion &orient)
void CEditorObject::getBound(float3 *pvMin, float3 *pvMax)
{
if(!m_pEntity)
*pvMin = *pvMax = float3();
if(m_pEntity)
{
*pvMin = m_vPos - float3(0.1f, 0.1f, 0.1f);
*pvMax = m_vPos + float3(0.1f, 0.1f, 0.1f);
return;
}
m_pEntity->getMinMax(pvMin, pvMax);
}
if(SMVector3Length2(*pvMax - *pvMin) < 0.0001f)
{
*pvMin = -(*pvMax = float3(0.1f, 0.1f, 0.1f));
}
*pvMin += m_vPos;
*pvMax += m_vPos;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment