UGoogleARCoreFrameFunctionLibrary::ARCoreLineTrace

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

Windows
MacOS
Linux

Deprecated

  • This function is deprecated, use LineTraceTrackedObjects.

References

Module

GoogleARCoreBase

Header

/Engine/Plugins/Runtime/AR/Google/GoogleARCore/Source/GoogleARCoreBase/Public/GoogleARCoreFunctionLibrary.h

Include

#include "GoogleARCoreFunctionLibrary.h"

Source

/Engine/Plugins/Runtime/AR/Google/GoogleARCore/Source/GoogleARCoreBase/Private/GoogleARCoreFunctionLibrary.cpp

Syntax

[UFUNCTION](Programming/UnrealArchitecture/Reference/Functions)(BlueprintCallable, Category="GoogleARCore|LineTrace",
          Meta=(WorldContext="WorldContextObject", Keywords="googlear arcore raycast hit", DeprecatedFunction, DeprecationMessage="This function is deprecated, use LineTraceTrackedObjects."))
static bool ARCoreLineTrace
(
    UObject * WorldContextObject,
    const FVector2D & ScreenPosition,
    TSet< EGoogleARCoreLineTraceChannel > 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.

TraceChannels

A set of EGoogleARCoreLineTraceChannel 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