Line trace by channel sometimes returns wrong object

I recently noticed that in some very specific cases, my line trace returns an entirely different object than what I’m actually looking at! I am using the Break Hit Result → Hit Actor node, and you can see in the upper left corner that it is returning the name of the object looked upon.

When looking at the big apple thing, I would expect it to return the name “Pr_Test”, yet, as shown in the video, it shows the name of the door! This only happens when I look at the door before I look at the apple.

Does someone perhaps recognise this problem and know the solution to it? I’d be happy to send more videos or screenshots if that could help figure this out.

1 Like

This will be your code :slight_smile:

I assume you’re putting the found object into a variable? If that’s the case, there’s something up with how you’re managing that variable.

I am indeed putting it in a variable, though the name being printed is directly from the Hit Actor.

I am so sorry for this whole thing! It was simply the door having two colliders in its mesh for some reason… It’s all resolved now! Thank you for taking the time anyways!

2 Likes