ActorLineTraceSingle vs. GetWorld()->LineTraceSingle

What’s the difference between these two functions? When would I use each one?

I also have another seemingly simple question: for the Start and End parameters, it seems like if I wanted to do a raytrace from my character, I’d put the character’s position as Start. But if I want to trace a distance of 10 units in front of him in the direction he’s facing, is there a way I can get those End coordinates without doing a bunch of trig?

I’m not sure about the difference between the two functions, but as for the math, it’s fairly simple (assuming you’re doing this in the Character class):

    FVector startLoc = GetActorLocation();
    FVector endLoc = startLoc + GetViewRotation().Vector() * 10.0f;

Thanks, that makes sense. I tried both functions and as far as I can tell, ActorLineTraceSingle() didn’t do anything, but the other one worked.

Even simpler maths for if you want to ray trace in the direction of the character GetActorForwardVector() returns the X-axis in the actors space.

Not sure if u still need this: ActorLineTraceSingle work only with calling actor’s components, while GetWorld()->LineTraceSingle works for the whole world.
Bringing it up, cause it’s a second result on the search of “ActorLineTraceSingle”, someone may have same question in the future.