Navigation
API > API/Runtime > API/Runtime/InteractiveToolsFramework > API/Runtime/InteractiveToolsFramework/UGizmoElementTorus
Description
LineTrace approximates ray-torus intersection by intersecting the ray with the plane in which the torus lies, then determining a hit point closest to the linear circle defined by torus center and torus outer radius. If the torus lies at a glancing angle, the ray-torus intersection is performed against cylinders approximating the shape of the torus.
| Name | LineTrace |
| Type | function |
| Header File | /Engine/Source/Runtime/InteractiveToolsFramework/Public/BaseGizmos/GizmoElementTorus.h |
| Include Path | #include "BaseGizmos/GizmoElementTorus.h" |
| Source | /Engine/Source/Runtime/InteractiveToolsFramework/Private/BaseGizmos/GizmoElementTorus.cpp |
virtual FInputRayHit LineTrace
(
const UGizmoViewContext * ViewContext,
const FLineTraceTraversalState & LineTraceState,
const FVector & RayOrigin,
const FVector & RayDirection
)