I made a simple Line Trace Channel blueprint to test a shooting mecanic. The principle is pretty simple; I trace a line from the camera viewpoint (with a little offset) to set the location where the player is looking at, then a second trace line from the Mannequin’s head to that point. I have also put an explosion animation at the end of the line trace to confirm the hit, accompanied with an explosion sound.
Everything works fine except that sometimes, the explosion doesn’t occur normally. The explosion appears at another location (wich I presume is 0,0,0). I also hear the explosion sound when this happens. It seems so random I have no idea why it’s not working. Sometimes it works normally, sometimes it doesn’t, depending on where I am aiming at (wich doesn’t makes sense to me). I tried shooting at 20 different spots on a wall and, it goes like this : Works, works, doesn’t works, works, doesn’t works, doesn’t works, doesn’t works, works, etc. It’s really random (and depending on where I’m aiming).
If I keep shooting at a spot where it didn’t worked, it will never work.
I put some images of the situations and my blueprint if someone can help me out looking at those. If you need further explanations just ask me !
What the Line Traces look like.
What it looks like when it works.
When it doesn’t work (you can see the light of the explosion on the blocks).
I’m aiming at another location, but the explosion still appears at another location (not sure it’s 0,0,0 but I’m guessing it is).