【UE5】LineTrace End does not follow camera pitch (vertical rotation)

Hello,

I am trying to fire a LineTraceByChannel from the center of the third-person camera.
Currently, the LineTrace correctly follows the camera’s horizontal (Yaw) rotation,
but it does NOT follow the camera’s vertical (Pitch) rotation.

When I move the camera up or down, the Ray does not change direction.

How can I make the LineTrace’s End follow the camera’s Pitch as well?

Is there something wrong with how I am getting Get Control Rotation?

I would appreciate your help in understanding the cause of this issue and how to fix it.


【Current Setup】

  • StartFollowCamera → Get World Location
  • EndFollowCamera → Get World Location + (Get Control Rotation → Get Forward Vector × 1000)
  • Using LineTraceByChannel for the trace

:camera: (I have attached an image of my current setup.)


【Environment】

  • Unreal Engine 5.4.4
  • Using ThirdPerson Template
  • FollowCamera is attached to SpringArm (CameraBoom)
  • Using Enhanced Input System

Thank you in advance for your help!

Hey @anemone000! Welcome to the forums!

I think the issue is because you’re not multiplying the vector by 1000, you’re multiplying ONLY the X value by 1000 and the others by 0, making them never be able to adjust Y or Z since it will always end up 0.

Try changing that multiply node to be 1000 on each of X, Y, and Z and I think that should fix your issue! :slight_smile:

1 Like

Hi @Mind-Brain San.

Thank you so much!

Following your advice, I applied 1000 to all values, and now it works exactly as I wanted!
I’m so happy!! :tada:

This was my first time posting on the forum, and having someone as kind and helpful as you respond to my question was the best luck I could have had.

The issue is completely resolved! Thank you again! :blush::sparkles:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.