Download

Make line trace longer

Need a tad bit of help, I want to make my line trace longer. Right now it goes as far as the mouse but I want it go longer/farther. I tried multiplying the y or z of the mouse position (2D game so X is constant) but it messes up the direction.

Untitled.png

Hello,
maybe this linetrace set up will help you :

This is from the tom looman’s usable actor tutorial :

Not much help so far, but still playing around with it.

Do not end the trace en on the mouse location, Im not very sure how to do it now, but you have to use some rotation, for example, somethink like “get look at rotation” and make your trace on that direction and with the lenght you want


I did some work based on that, Ill post it here if I find it

Maybe you can calculate a far position using the 2 points you have to set a third point on the same line and use this point as end.

Try this:

That does make it longer, however it causes the line trace to start at the camera which I don’t want. Im going to try to edit this to my needs.

EDIT: Got it to work, I kept modifying the X value of the Mouse’s World Location before adding the direction. Thanks alot Zeustiak and others for taking your time to help.

Based on zeustiak and tom looman’s systems : linetrace.png It works fine.

Yup, thats exactly what I did.