How can I get the wold location of impact point of a line trace?

Simple question from a newbie. Also I want to know how to detect it when there is a difference between the hit distance of last line trace and the one before it. Thank you :slight_smile:

1 Like

This pin tells you the distance

If you want to know if the distance is not the same as before, just store each distance is a variable, and you can compare them :slight_smile:

But your title asks how to get the world location of the line trace? You can use either pin, Impact point or Location.

2 Likes

But I want the game to compare for me, the system must be aotumatic, is there a way to detect this difference with nodes? Like every time this nodeset works, it will check if the distance is same as before, and it will trigger an another nodeset if there is a difference. How Can I achieve that?

Ok, I get it.

But, the distance will basically never be the same as before, it always varies a little.

Do you mean approximately the same as before?

2 Likes

Not necessarily aproximitly, there could be a tolleration. But mabe aproximitly could also do the trick in my case, but it’s better with a certain tolleration.

1 Like

Ok, well we can make the tolerance part of the blueprint.

I will put some code here later ( have to go right now ).

1 Like

All you need is this

The error threshold needs to be somewhere around 25 or more, otherwise it will not find the distances the same unless you are literally standing still.

2 Likes

If I set the threshold more than literally 0, it always detects a difference. Starting location is inside the character it’s probably hitting the character, tho I don’t see the line turnig green. Firstly, in the probable case of line trace hiting the charactter, how can I prevent it?

It will. Bigger threshold = no difference.

No, I mean literally anything bigger than absolute 0 results in no difference every time, I tried it with 0.01 treshold value and the resoult is same. Altought, when there is no treshold, it detecs a difference every time, even when the character stands still. Really bizarre I don’t understand.