ToolSceneQueriesUtil::FindNearestVisibleObjectHit

Find the nearest object hit by the LineTrace from Start to End that is currently visible (provides correct result in Editor)

Windows
MacOS
Linux

References

Module

ModelingComponents

Header

/Engine/Plugins/Experimental/MeshModelingToolset/Source/ModelingComponents/Public/ToolSceneQueriesUtil.h

Include

#include "ToolSceneQueriesUtil.h"

Source

/Engine/Plugins/Experimental/MeshModelingToolset/Source/ModelingComponents/Private/ToolSceneQueriesUtil.cpp

Syntax

namespace ToolSceneQueriesUtil
{
    bool ToolSceneQueriesUtil::FindNearestVisibleObjectHit
    (
        UWorld * World,
        FHitResult & HitResultOut,
        const FRay & Ray,
        const TArray< UPrimitiveComponent * > * IgnoreComponents,
        const TArray< UPrimitiveComponent * > * InvisibleComponentsToInclude
    )
}

Remarks

Find the nearest object hit by the LineTrace from Start to End that is currently visible (provides correct result in Editor)

Returns

true if a visible hit was found

Parameters

Parameter

Description

World

the world to trace into

HitResultOut

the resulting hit, if true is returned

Ray

hit ray

IgnoreComponents

optional list of Components to ignore

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss