How do you perform a trace?

How do you perform traces like in the previous udk in ue4? Do i have to make it an entirely new function starting from scratch and do it myself or is it preset in ue4 with all the parameters and variables etc?

If you look in UWorld, you will find a large selection of line trace (ray cast), geometry sweep and overlap functions- far more than we had in UE3. Traces and sweeps come in 3 types - ‘test’ (just yes or no result), ‘single’ (a single blocking result) and multi (multiple touch results possibly followed by a single blocking result).

Ok. Thx. Where do i find Uworld tho? And how do i call the uworld to perform a trace in the level and wat r the parameters and function name?

World.h contains UWorld class. That contains lots of functions.

Search LineTraceTest in the file, and look after that.

bool LineTraceTest(const FVector& Start,const FVector& End,ECollisionChannel TraceChannel,const struct FCollisionQueryParams& Params) const;

You’ll see sets of functions you can use for trace.

Thanks,

–Lina,

AH thx for the help. Ill look into and get started!