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"

Projectile Collision Overlapping With Player Character

Hi, as mentioned in the title I am having an issue with UE4 where when I fire off my projectile my characters collision is overlapping with it when I don't want it to. I am new with unreal and have little knowledge of scripting so this could be an obvious answer but I don't know. alt text I figure that i'm missing something simple and ive tried having it ignore the collision by using tags but this didn't seem to work, any assistance would be appreciated, thank you.

Product Version: UE 4.13
Tags:
more ▼

asked Oct 20 '16 at 12:24 AM in Blueprint Scripting

avatar image

RyanD2233
15 2 3 6

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

1 answer: sort voted first

Ok first in your projectile instead of using the Event Actor Begin Overlap you should use the OnComponentBeginOverlap event of your CollisionBox.

Edit: Now a way that could be better to avoid collision with your self is checking if the other actor is your instigator. When you spawn bullets you have the instigator pin.

alt text

Now when your character spawns the bullet you should fill that pin with a reference to self so the bullets know who their owner is. So if you filled that pin you can use this node inside your projectile.

alt text

And you can use an equal object node to check if they are equal, if they are then you ignore the collision, if they are not equal then you do whatever you need to do.

more ▼

answered Oct 20 '16 at 12:37 AM

avatar image

MacDx
600 17 9 33

avatar image Night Watcher Oct 20 '16 at 02:12 AM

Instead of checking if they are equal, I would suggest adding to your construction script of the projectile the "Ignore Actor When Moving" function, and connect your get Instigator node to it

avatar image RyanD2233 Oct 20 '16 at 07:29 PM

Thanks for the help, I think I've been doing something wrong when testing this and I couldnt fully understand how the instigators worked but I managed to get it working when i realized that it wasn't the character that was causing the overlap it was the projectile itself, the collision was overlapping with the bullet. Thanks anyway, shows how the smallest overlook can cause such problems.

(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