Navigation
API > API/Editor > API/Editor/UnrealEd
Description
Trace the specified world to find a position to place an object. If nothing is hit, use a default position in front of the camera (determined by ULevelEditorViewportSettings::BackgroundDropDistance)
| Name | UE::Positioning::TraceWorldForPositionWithDefault |
| Type | function |
| Header File | /Engine/Source/Editor/UnrealEd/Public/Editor/ObjectPositioning.h |
| Include Path | #include "Editor/ObjectPositioning.h" |
| Source | /Engine/Source/Editor/UnrealEd/Private/Editor/ObjectPositioning.cpp |
namespace UE
{
namespace Positioning
{
FObjectPositioningTraceResult UE::Positioning::TraceWorldForPositionWithDefault
(
const FViewportCursorLocation & Cursor,
const FSceneView & View,
FCollisionQueryParams * CollisionQueryParams
)
}
}
Result structure containing the location and normal of a trace hit, or a default position in front of the camera on failure
Parameters
| Name | Remarks |
|---|---|
| Cursor | The cursor position and direction to trace at |
| View | The scene view that we are tracing on |
| CollisionQueryParams | Optional existing collision query parameters to use, except for TraceTag and bTraceComplex, which are overriden by the function. |