Choose your operating system:
Windows
macOS
Linux
Module |
|
Header |
/Engine/Source/Runtime/Core/Public/Math/UnrealMathUtility.h |
Include |
#include "Math/UnrealMathUtility.h" |
Source |
/Engine/Source/Runtime/Core/Public/Math/Box.h |
template<typename FReal>
static bool LineBoxIntersection
(
const UE::Math::TBox< FReal > & Box,
const UE::Math::TVector< FReal > & Start,
const UE::Math::TVector< FReal > & End,
const UE::Math::TVector< FReal > & Direction,
const UE::Math::TVector< FReal > & OneOverDirection
)
Determines whether a line intersects a box. This overload avoids the need to do the reciprocal every time.