Linetrace only fires along forward vector at center of map

Before plugging the multiplication node into the end point of the linetrace, add your start location to it.

(GetForwardVector * 9000) + Root->GetWorldLocation

When I get on my desktop I’ll post a screenshot

Ok, I am pretty novice, and am usually able about hashing stuff out. This has me severely confused though. At the center of the map where the axis meet, it all works fine.

However, when I move off from the center in any direction, the trace no longer fires of along the forward vector…

I have tried getting the rotation and forward vector from all components of the rifle blueprint, and it still does the same. Blueprint is this:

Any help would be greatly appreciated. Like I said it’s pretty cobbled together. =/

End = RootWorldLocation + ForwardVector * 9000

Alternativly you can replace root with your TraceSpawnPoint. Depends if he is facing the right direction :stuck_out_tongue_winking_eye:

Yeah I figured as much but was short on time so literally just threw up what I could. I would hazard a guess this is linked to my utter bodge job on equiping the rifle blueprint to the character controller. Which I am submitting to you now with the greatest of shame at how much of a hack it is. It worked so I was happy. shame face

Yeah, I have tried that. Still no dice. I would hazard a guess its how I am equipping the blueprint to the character controller :’(

Try adding the output from getworldlocation to your end location.

So it will be EndLocation = StartLocation + DesiredEndLocation basically

I’m not quite sure what you mean?

The End Location of your Line Trace should be TraceSpawnPoint->GetWorldLocation + TraceSpawnPoint->GetForwardVector * 5000.

Also not 100% sure, but I think the Rotation Rule of AttachToComponent needs to be SnapToTarget (check my first suggestion, if it’s still not working, check this next).

However, in the end you want to attach it to a bone Socket of your Skeletal Mesh anyway. There is already a fantastic tutorial by Zak Parrish about a Twin Stick Shooter. When I made it 1 year ago everything worked and it was a great source of knowledge. <3

I think you cracked it! Not sure if its exactly what you meant, but I think it now works! What a legend you are sir!!!

Here is how I set it up:

Props to you! This had been plaguing me for DAYS. :wink: