UWorld::AsyncLineTraceByObjectType

Interface for Async.

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Engine/World.h

Include

#include "Engine/World.h"

Source

/Engine/Source/Runtime/Engine/Private/Collision/WorldCollisionAsync.cpp

Syntax

FTraceHandle AsyncLineTraceByObjectType
(
    EAsyncTraceType InTraceType,
    const FVector & Start,
    const FVector & End,
    const FCollisionObjectQueryParams & ObjectQueryParams,
    const FCollisionQueryParams & Params,
    FTraceDelegate * InDelegate,
    uint32 UserData
)

Remarks

Interface for Async. Pretty much same parameter set except you can optional set delegate to be called when execution is completed and you can set UserData if you'd like if no delegate, you can query trace data using QueryTraceData or QueryOverlapData the data is available only in the next frame after request is made - in other words, if request is made in frame X, you can get the result in frame (X+1)

FTraceDelegate TraceDelegate; TraceDelegate.BindRaw(this, &MyActor::TraceDone);

Parameters

Parameter

Description

InTraceType

Indicates if you want multiple results, single hit result, or just yes/no (no hit information)

Start

Start location of the ray

End

End location of the ray

ObjectQueryParams

List of object types it's looking for

Params

Additional parameters used for the trace

InDeleagte

Delegate function to be called - to see example, search FTraceDelegate Example can be void MyActor::TraceDone(const FTraceHandle& TraceHandle, FTraceDatum & TraceData) Before sending to the function,

UserData

UserData

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