Best way to handle projectile collisions(bullets)?

What is the best way to handle projectile collisions(bullets)?

Keep in mind the following:

  • MyCharacter can fly or moves fast so the MyCharacter sometimes overlaps the bullets
  • I am doing Multiplayer (with replication)
  • I am looking to get a hit event/launch character when hit by bullet

I have tried both Overlap and Event Hit. Both have challenges for multiplayer. One specifically is my player keeps overlapping his own bullets.

I am not sure how one should handle projectiles to create collision events in multiplayer games. Any help would be greatly appreciated.

To prevent your own character from colliding with the bullets, you can you the node ‘SetIgnoreActors’. Once you have spawned the projectile, use this node to add your character into the list of ignore actors for that projectile. You can additionally add the reverse (ie add the projectile to the list of ignored actors of your character) just to be safe.

You can also add other team member characters into the list if you dont want your team-members to hit the bullets. If you just want to prevent friendly fire (ie your team mates can hit your bullets but wont take damage), you don’t have to do this, instead do it inside TakeDamage.

Thank you for sharing that node “SetIgnoreActors”. I have never seen this before. +1 my friend and a big thank you.

How do I get this NODE?

In the blueprint editor, get a reference of the collision component/mesh component(if you dont have separate collision component) and draw-out a connector and try typing Ignore Actor, it should pop-up in the list.
The name of the node is ‘Ignore Actor’