Problem createing a Line Trace based on AI Direction

Hi, I’m trying to create a Line trace, that sends the trace out in front of the AI, based on the direction the AI is facing/Moving. the problem is, the trace seems to appear from the sky instead of tracing from the direction the AI is facing/moving. I have tried different things but i can only seem to get it to either trace how you see in the picture or it will trace in the same direction all the time.

photo Pic_01_zpswevanivx.jpg

Grateful for any help.

Thanks

Hi,
Why try to use the rotation of a socket instead of of the rotation of the pawn (the character) ?

It’s not clear what you’re trying to do with the socket transform. Currently you are taking the socket rotation, and rotating a vertical vector (0, 0, 180), which is why you’re getting a vertical trace.
At a guess, what you want is:

SocketLocation → Start
SocketLocation + SocketRotation.ForwardVector * 1000 → End

I still cant get this to work, what I want to do is get the AI to trace whats in front of him. so when the trace is broken by sometime, say the player then the AI will react and do something. I added the socket thinking it might be easier to use that as a reference as to where to start the trace from, and just have it trace straight ahead.

Okay I finaly got this working. I had the AICharacter go in to both a Get Actor Location and Get Actor Forward Location. then timed the Get Actor Forward Vector with a VectorXFloat by a value of 1000 I then added that value to the Get Actor Location. plugged the Add in to the Start, and the Get Actor Location in to the End of an Line Trace for Objects node. then added a Make Array (set to pawn) to the Object type.