How do I draw a debug line in the direction of my movement input?

I have a pawn that the left controller stick and keyboard (WASD) move it around with. I can also aim with the right stick.

I want to draw a debug line that faces the direction that the pawn’s movement input is. I’m stuck on getting vectors to work. I have one debug line for my aiming that draws fine, but the movement one is tougher.

For example, if the character is aiming forward, but strafing to the left, I’d want to draw the strafing line.

Hi, try something like this, not sure I follow exactly what you need but this will show you how to draw debug lines that follow your pawn while moving it, this nodes are from Character Blueprint.

Regards.

Thanks for the reply @durabo

I gave that a shot, but the line didn’t draw out, it just was a dot. Was I doing that right?

In any case, here’s a pic of what I’m trying to do. The GREEN line would be the facing direction of the player cylinder (that is easy…).

The RED line would be what the left controller stick is doing relative to the camera. (In this case, the left stick would be pushing right, and the player will move shortly after.) Does that make sense?

(This is just an MS paint example).

76010-unreal+debug+lines.png

Hi, sorry delayed response, I think you might need something like this.

If you want to make it happen camera rotation related instead of actor rotation related then try something like this, notice I dragged a Follow Camera to BP and get its world rotation instead of the Actor Rotaion. (also only showing for A/D same would be for W/S)

Regards.