Prevent line trace from hitting capsule
Hello everyone, I could need some help for setting up player's capsule. When I shoot, the line trace hits my capsule and the only way I found to prevent this is to move forward the camera but this causes clipping into the walls. How can I fix that? Thanks in advance :)
asked Jun 12 '19 at 08:58 PM in Blueprint Scripting
you could try to make an array for the 'actors to ignore' and add a reference to self. If that doesn't work I guess you could do a multi line trace and get the first hit that isn't your capsule.
probably should do a print string to print out the hit component to confirm whether it's hitting the gun mesh or capsule or what.
I don't know what kind of line trace you're doing, but there are some things you could try:
LineTraceByChannel set to visibility should be excluding the capsule by default, since it's not a visible component. Ignore self should exclude all the components of the player character as well. But maybe you're not running the script in the player character BP...
There are further details needed to pin point the problem.
answered Jun 12 '19 at 11:26 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here