Line trace with event tick projectile

i made a projectile using line trace it works fine but a lot of times line goes two ways check the images

alt text

i m trying to make best bullet as good as i can and i want to use line traces for that but two way is not a very good thing

I’m not quite sure what you mean, what do you mean by too ways? what does tick have to do with the entire thing? What are you trying to do exactly?

Did you try to change the tace channel in the LineTrace Node from Camera to visibility?

if you look at the picture in my comment line trace should be inside the ball but it still goes dawn and fallow the ball two that is the two ways i m talking. I did this because get forward vector does not working properly i know it should be but still something wrong so i made up another way to make line trace what i try to do is making good bullets

Hey,

I think your problem is that the NewVar vector starts on 0,0,0 so the first tick he will calculate a ray from 0,0,0 to the actual shoot position.

To fix this you can set the NewVar to the gun position or something when you spawn your projectile.

Hope this helps,
Elias

Yes you are right i solve it with setting projectile position to variable in begin play and it fix that problem this is helpful begin play works faster than event tick :slight_smile: