Is it necessary to attach gun to character for line trace to work?

I am new to Unreal. Completed a couple of line trace tutorials successfully. Now I am trying on my own. I created a project from blank template and inserted character blueprint class. Line trace is not working. The only difference I can think from tutorials is now I don’t have gun attached to characte now. My question is It mandatory to attach gun to character for line trace to work? What else I may be doing wrong?

Your just simply trying to run a line trace? Do you have the debugging on, so you can see the red debug line? Posting your blueprint to see your code would be very helpful.

K

no you dont need a gun. i agree that seeing your blueprint would help. also what channel are you tracing against? if your using the visible channel that doesnt always work against characters.

Kmontoya, ThompsonN thanks a lot for your response. I am attaching my character and my light blueprints. Almost the same blueprints working fine in another project in which I am using FistPerson Template.
I think there is something wrong with my character (I mean the character I created with Character blueprint class and not my own character :slight_smile:

).

Event Tick? Did you modify the tick settings at all, or are you actually firing off 60+ times a second?

Do you see the line trace debugging line at all?

This is what I would do to begin the debugging process
_

  1. Remove Tick Event and replace it with something that can be executed manually such as Input LeftMouseButton or L key on the keyboard - anything along those lines really.
  2. Print Strings are going to be your best friend, I have more printstring nodes than game code in total! lol
  3. Add a print string at the False Branch node, to make sure its not just failing everything
  4. Add another print string at the Cast Failed node, to make sure its not just failing every cast
    _

This should at least get you started in the right direction, if things are not false everytime, and the casts are successful, post back the results, and we can continue poking at it.’

K

Thanks, I will try it and post my results. By the way is Event Tick is heavy on compute? I just saw it in a tutorial.

Print screen helped a lot Kmontoya, thanks to you I have solved the problem. One link helped me very much to understand RayTrace and collinsion, want to share here [link text][1]

Also I was making little mistake which cost lot of time, I was using multiplication pin instead of Addition, as you can see in image attached. It cause strange behavior as character shooting from back :slight_smile: , etc.