Weird LineTraceByChannel behaviour
Hello guys, this is my first time posting on the Unreal Forums. To keep it short, I started a quick project today and ran into a weird problem I have never seen before. I am probably just missing something obvious (like me changing something).
But basically, I set up a simple Line Trace loop. All it has to do is trace 300 units forward respecting the rotation and movement of the players camera. I have done this quite a lot of times before and this WAS working at the beginning. The trace seems to be a few units too far away from the camera and also the rotation is opposite to what I'm doing (looking left, tracing to right). I'll attach some pictures about the issue lower.
Update: I've been fiddling around with the scripting and I've found out that the end point of the trace tends to head for what looks like 0,0,0.
Update 2: So I have created a new character blueprint with the same functions and seemingly the same settings as my old one and the problem does NOT appear on the new character. This is really confusing me.
As I figured. I was too tired for it last night. I reviewed and saw my horrible mistake.
I was using the Start vector for the LineTrace as my End Vector (result of adding up location with forward vector) and the End Vector was only my Forward Vector (explaining the END position always being close to 0).
answered Nov 10 '16 at 04:04 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here