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. 

Player damaging Self?


I am having a bit of an issue, I have set up melee collision so that a player of one type can deal damage to a player using the same type of character, but if I stand in place and attack my player kills itself because it collides with itself. How can I change the system so it ignores my player and only hits enemy targets?

Thank you.

alt text

Product Version: UE 4.14
damagehelp.png (64.6 kB)
more ▼

asked Mar 09 '17 at 04:00 PM in Blueprint Scripting

avatar image

10 1 2 4

avatar image Arty-McLabin Mar 09 '17 at 05:17 PM

basically you need to add your character to the ignore array of the weapon's collision. seems not to work as expected in blueprints tho, i'm in a same problem and by now i workaround by setting the weapons and characters in different layers + set each actor class (player/weapon) to ignore the other's layer. like that you at least can walk with the weapon around..

avatar image Deathstick Mar 11 '17 at 07:44 PM

I might recommend using a raycast instead, with the raycast having "self" added to its ignore list. It's a little bit more easier to work with and is less prone to strangeness having tried both box collision and raycast methods. The way I did it for a sword was to set the start to the location of the swords socket/handle and the end point to be the swords socket location + (forward direction*200, 200 being the length in units of the sword's blade) For axes you could just do multiple raycasts from different locations, and use the preview raycast option to see that its casting the overall shape of the blade accurately enough.

My 2 cents anyways.

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

1 answer: sort voted first

Add a branch next to "OnComponentBeginOverlap" and check if "OtherActor" equals Player Pawn.

more ▼

answered Mar 11 '17 at 09:53 PM

avatar image

110 5 9 15

avatar image Arty-McLabin Mar 12 '17 at 08:42 PM

keep in mind that this option adds a bit of load on performance, because the overlap events still occur. a better way would be setting the overlaps to be ignored.

avatar image Naurder Feb 25 '19 at 01:24 PM

it helped a lot, thank you alt text

imgggg.png (49.1 kB)
(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