Download

Create a trace using 2 points and a distance

I’m trying to create a line trace. The start is the actor’s location 1 frame ago. The end point is the actor’s current location but i need to extend the trace.

It starts a 1 point and passes thru the second point and ends at a set length.

Hope that makes sense.

You can achieve that by doing something like this:

Basically, find the direction vector from your previous frame location to current location. Then multiply it by the total trace distance required and add the resulting vector to the previous frame location. So this should give you a point ahead of the actor in the direction that you’re traversing. I hope that is what you were asking for.

As for the previous frame location, you can store it in a variable after you’ve performed your trace operation so that it can be used in the next frame. Also make sure that you’re using a trace channel that is not blocked by the actor.

Absolutely perfect. Thank you