Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

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 :)

Product Version: UE 4.21
more ▼

asked Jun 12 '19 at 08:58 PM in Blueprint Scripting

avatar image

7 1 1 3

avatar image GarettHunter 6 days ago

Can you show a screen capture of the line trace node you are using?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

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.

more ▼

answered Jun 13 '19 at 07:46 AM

avatar image

1.3k 9 4 10

avatar image David432 6 days ago

Thank you, I've created an array which I've then casted to the firstpersoncharacter and used "get player character" as object and that worked.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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.

more ▼

answered Jun 12 '19 at 11:26 PM

avatar image

236 3 6 7

avatar image David432 6 days ago

i'm using this node https://imgur.com/a/9tEf17L

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question