x

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. 

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:

alt text

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.

alt text

And here's what I got for my Bullet_BP.

alt text alt text

alt text

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!

Product Version: UE 4.8
Tags:
more ▼

asked Aug 19 '15 at 12:36 PM in Blueprint Scripting

avatar image

WeakCloud
6 1 1 2

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

3 answers: sort voted first

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

more ▼

answered Aug 19 '15 at 01:58 PM

avatar image

Shadowriver
36.5k 930 169 1111

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

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.

more ▼

answered Mar 31 '17 at 02:24 AM

avatar image

Tapuck
1 1 1

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

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.

-Erik

more ▼

answered Aug 10 '17 at 12:30 PM

avatar image

erik321123
408 17 15 31

(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