I have a line trace based hit detection for weapons. I want a blood splatter to appear behind the actor when they’re shot. For that I need to do a line trace to a) make sure there even is a wall to put the blood on and b) get the angle of the wall so that the decal is applied properly.
What I need to do is to get the point where the gun hits, get the direction of where the shot was fired from, then create another trace in the same direction from actor.
After trying out different search terminologies, I found an answer in a Reddit thread. Here’s how I did it, for those who find this post in the future:
Firstly, get direction out of your trace like so:
Get both this direction and “Location” vector from your trace to the target actor, using interface for instance:
Then multiply direction by your desired length and add that to the impact location.