How can I make the projectile to ignore the owner(?)?

Hi, all!

I have been studying UE4 for about 2 weeks, and just tried to create a basic projectile shooting system(?) and got some problems with the collision component.

I am trying to make the projectile to ignore the the shooter (or the owner(?)), and couldn’t really figure it out by myself.

Here’s what I have done so far:

This is a Fire Projectile function inside my ThirdPersonCharacter_BP. It will be called underneath “Event Graph” section when the “Left Mouse Button” is clicked as shown below.

54794-cap+2015-08-19+22-07-15-923.jpg

And here’s what I got for my Bullet_BP.

54795-cap+2015-08-19+22-07-52-789.png

54796-cap+2015-08-19+22-07-31-860.jpg

54798-cap+2015-08-19+22-33-47-820.png

I thought that by ticking the “Pawn to Ignore” would solve the problem, but it actually did none…

According to what I have researched, “ignore actor when moving” node would solve this problem but I don’t really get where and how I should implement this.

Can someone please solve my problem?

Thank you!

If you want them to ignore owner (by that i mean everyone use same projectile players and other pawns) you need to implement the check on collision event, since as i know default code does not have that. If you want them to ignore only player, you set player actor to one group and the rest of pawns to other and set projectile to igonre the other pawns group. I think your problem might be the fact that you don’t have set proper object type to your actor (for example projectile is set to World Static).

When you spawn in the projectile, send in the “Self” variable as the instigator. Then in the projectile blueprint, add a check to your “on overlap” to make sure that the other actor is not the same as the instigator (using “get Instigator”). This worked for me, and I have my collision preset to overlap all dynamic.

If the problem is with the player’s collision mesh instead of the projectile, you can set a variable to the spawned actor, and then check your own collision capsule against that variable to see if the touching projectile is equal to the one the player shot.

1 Like

Add a owner to the spawn node, add it as input in your function and put the self node as parameter. To detect hit do the OnHit event in the projectile compare the OtherActor with the owner and if it is not equal deal your damage and everything else, else do nothing.

EDIT:
You might have to cast the other actor to your charactertype and get its collision component and compare that. But I dont think so.