Fixes lp Bug #1828747 - Add some epsilon value to ray dir on orthographic mode

so they will not be zero when viewing the board com the top/bot.
This was causing problems with BBox intersect function that was using
invDir values.
This commit is contained in:
Mario Luzeiro 2019-05-13 22:14:15 +01:00 committed by jean-pierre charras
parent ef5c69167a
commit b9a17b928a
1 changed files with 2 additions and 2 deletions

View File

@ -310,7 +310,7 @@ void CCAMERA::MakeRay( const SFVEC2I &aWindowPos,
case PROJECTION_ORTHO:
aOutOrigin = up_plus_right * 0.5f + m_frustum.nc;
aOutDirection = -m_dir;
aOutDirection = -m_dir + SFVEC3F( FLT_EPSILON );
break;
}
}
@ -341,7 +341,7 @@ void CCAMERA::MakeRay( const SFVEC2F &aWindowPos, SFVEC3F &aOutOrigin, SFVEC3F &
case PROJECTION_ORTHO:
aOutOrigin = up_plus_right * 0.5f + m_frustum.nc;
aOutDirection = -m_dir;
aOutDirection = -m_dir + SFVEC3F( FLT_EPSILON );
break;
}
}