ULuminARFrameFunctionLibrary::LuminARLineTrace

Traces a ray from the user's device in the direction of the given location in the camera view.

Windows
MacOS
Linux

References

Module

MagicLeapAR

Header

/Engine/Plugins/Lumin/MagicLeap/Source/MagicLeapAR/Public/LuminARFunctionLibrary.h

Include

#include "LuminARFunctionLibrary.h"

Source

/Engine/Plugins/Lumin/MagicLeap/Source/MagicLeapAR/Private/LuminARFunctionLibrary.cpp

Syntax

[UFUNCTION](Programming/UnrealArchitecture/Reference/Functions)(BlueprintCallable, Category="LuminAR|LineTrace",
          Meta=(WorldContext="WorldContextObject", Keywords="luminar raycast hit"))
static bool LuminARLineTrace
(
    UObject * WorldContextObject,
    const FVector2D & ScreenPosition,
    TSet< ELuminARLineTraceChannel > TraceChannels,
    TArray< FARTraceResult > & OutHitResults
)

Remarks

Traces a ray from the user's device in the direction of the given location in the camera view. Intersections with detected scene geometry are returned, sorted by distance from the device; the nearest intersection is returned first.

Returns

True if there is a hit detected.

Parameters

Parameter

Description

WorldContextObject

The world context.

ScreenPosition

The position on the screen to cast the ray from.

ARObjectType

A set of ELuminARLineTraceChannel indicate which type of line trace it should perform.

OutHitResults

The list of hit results sorted by distance.

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