Line Trace shooting in wrong direction after editing Blueprint (was working before)

Hey everyone :waving_hand:

I’m having an issue with my line trace setup. It was working perfectly before with the same template, but now the trace is shooting in the wrong direction and won’t let me pick up or interact with objects anymore.

Here’s what I’m using:

  • Line Trace by Channel (Visibility)

  • Start = Camera → Get World Location

  • End = Camera → Get Forward Vector * Trace Distance + Start

  • Debug lines draw correctly but they’re aiming up instead of straight from the camera

  • Using Realistic True First Person Template

I’ve double-checked:

  • The “Camera” reference points to the actual camera component

  • “Use Pawn Control Rotation” is enabled on the camera

  • Character has “Use Controller Rotation Yaw” enabled

I’m calling the trace on interaction like this (with an interface system):

  • Input → Shoot Trace → checks if hit actor implements interface → calls Interact

Any ideas what could be causing this? Is my trace direction being inverted because of the camera rotation?

1 Like

Multiply :wink:

1 Like

Well, will try that, though that’s not what I did before and it still works. UE likes to behave so rare–one day the boy is working perfectly fine and the other is not

1 Like

Remember the bug where you had add a +1 to line traces or it would go backward did that bug come back?

1 Like

I don’t :slight_smile:

Adding 1 makes no sense.

If I remember it was with sphere tracing and you had to do a +1 to the start point because of hack someone put in like a very early version of Unreal 4 or maybe even 3 but then a programmer later fixed this hack which moved things .000001 forward, so the best fix was just to add a +1 to the BP then it was changed again to even better fix so this wasn’t required. Was a few years ago maybe like 6 or 8 at this point.

I was thinking he might have collision issues with his setup.

1 Like

Yes, I don’t recall that, I assume you’re correct. :nerd_face:

I just know that adding the trace distance to the forward vector won’t work. That’s all.

1 Like

I KNOW WHY IT DIDN’T WORK NOW!! OMG. I was being so silly that I put “Add” instead of “Multiply”. 2 Days straight thinking why did I do wrong and it was that LOL. Thanks for the help tho

1 Like

I sorta fixed it. The trace is firing where the character is looking, not where the camera is aiming.

2 Likes

If it’s first person, the person is looking where the camera is aiming, no?