LineTrace for Gun not working in sky?
Hello! My LineTrace for my gun works fine. It's just that when I shoot in the sky, the bullet just doesn't go anywhere. It just disappears and hits my body. How may I fix this issue? Thanks!
Here are my blueprints and the video showing the issue: https://youtu.be/j3ekn05jUTk Cheers!
asked Jan 14 '19 at 12:48 AM in Blueprint Scripting
i imagine that your issue is the result of there not being a hit. without a hit you have no hit location and therefore any vector you set based on the hit location will not be correct (it should actually revert to a default location usually 0,0,0). im not exactly sure what you want to happen when you shoot at the sky since all your doing is spawning a actor and a sound at the hit location. i would add in a branch which makes sure there was a hit, to prevent the rest of the script from functioning when there was no hit. basically just add a branch after the line trace and connect the return value of the trace to the bool input on the branch. then connect your script to the true pin.
answered Jan 14 '19 at 02:53 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here