i ve noticed something now, the line trace by channel hits my shield, do i need to add an ignore actor ?
It also doesn t print out the green anymore
Client 1 is me
![image_2023-03-12_160150101](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/1/9/119f0b28eee4bf1cab93bf81e314bcd5f2ac5033.png)
i ve noticed something now, the line trace by channel hits my shield, do i need to add an ignore actor ?
so it s also registering my character s mesh?
so i got it to kind of work but it only hits it sometimes
ok im not understanding you correctly i dont think
The trace should hit the first object it finds which is you character
it should then (if set to block as it should) not hit again unless you trace again
the trace should have a component like i shown you, check if it matches shield, if true do nothing or code to say it hit shield. otherwise do damage
maybe you are targeteing different areas? how are you aiming the trace?
by visibility
ok but where is the end point? turn on the debug line trace to see where the line hits
oh, it s basically at the end of my sword
the end point not the start, or is it a collision sphere?
ok i think you are tracing wrong
tracing works by drawing a line in the direction you are facing, from you to a point in space
so you need to draw “from sword” to an area X amount ahead of your sword
idk, i just followed a tutorial on the sword part but it looked good to me, basically the sword was the trace, you touch something with the end of you sword and it does the action, but now i see that the trace will go through that something
if using the sword tip, you need to use a collision, not a trace , a small collision sphere at the tip of the sword, and check it to raise hit events on overlap
traces are usually for projectiles but can be used in this case but its not usually how its done
i didn t know
yeah, make sense
so how would i do this, do i like go in the sword bp and add a collision on the tip?
to keep with the trace you want to draw a trace FROM the tip of the sword to say a meter in front
you do that by multiplying the forward vector by say 100 add that to your player location.
this should draw a trace about a meter straight forward if that works then play lowering the “100” value to get a more accurate test from closer