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 FVector & Start,
        const FVector & End,
        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

Start

start point of line

End

end point of line

IgnoreComponents

optional list of Components to ignore

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback