Line Traces are left-sided

Hi there, I am working on inaccuracy of my weapons.

The Idea:
Get ForwardVector from Character
Get Point infront of Character in 10m.
Apply inccuracy to this point by adding a random inaccuracy vector.
GetDifference between new point and Character
Normalize
This is the ForwardVector for the Trace

However, the traces are somewhat left sided, even though the inaccuracy is both negative and positive.

My Graph looks like this:
9be618164db892329e8ae620218dc582a09c1455.jpeg
6dd693cf961dc9cf2c382fc9dfbd8a523bbd6be0.jpeg
ScreenShot00000.png

Do I overlook somehting?

The Trace is also turned to the left when I set the Inaccuracy to 0.

Can you make your ActorForwardVector visible and show the last image again?

In addition 2 points you probably missed:

  • Converting the result of your RandomFloatInRange node to a vector results in each coordinate of a vector having the same value. I doubt you want that, I guess you want each coordinate of your vector be random on their own.
  • Your way of applying inaccuracy results in the possible end points of your trace to shape a cube (at least after taking care of my first point, currently they do even only shape a line). That’s really unrealistic. Instead you want to apply inaccuracy by rotating your actor forward vector slightly in each coordinate (and then multiply it with the length of your trace). The resulting possible end points will then realistically shape a cone.

The line trace end is at the projectiles forward vector + a distance. In world space. You want it to be relative to the character, so add the actor location.

So End =( projectile forward vector) * (distance) + (actor location).

Oh, missed that :smiley:

Thank you so much. I always forget that xD