How to set an Actor not to collide with one specific other Actor without changing the collision settings?

Hi, is there a way to tell an Actor, in blueprints, not to collide with another specific Actor without changing the collision settings (channel, presets…) for all of the Actor’s collisions?

I want to use this so a blocking Actor that I want to attach to a Character doesn’t collide with that owner character but does collide with other characters.

1 Like

You could create custom collision channel for your player character and set properties as needed. Though i’m not really sure if it’s possible to achieve without C++.

Any ideas?

Hi BiggestSmile, thanks for your answer, that’s possible with Project Settings → Collision. The thing is that it’s a multiplayer game where are the player characters are the same, so can’t make that one has a collision channel different to the others.

So that’s why I’m asking: is it possiblet to set an Actor not to collide with one specific other Actor without changing the collision settings?

Oh i see now, sorry, misunderstood your question. I don’t see any other possible ways actually. Only thing i can think of is ignoring collision somehow within collision events, but that’s probably wrong way as events occur according to collision properties…

It would require some code rewrite i assume, actually interested in the subject as well. Hope someone from staff will reply :slight_smile:

Any suggestions?

Hey,

You could use Actor Tags and check the tag when a collision occurs and perform different actions based on the tag provided.

Here’s a sample for overlapping, but you could use an OnHit event and check the tag and enable/disable collision if you wish.

-W

Great, I’ve checked out and there’s an array named “Tags” for blueprint characters, and possibly many other actors, so I can set different tags for each players and compare them for wanted operations. Thank you!

How would you set this array up? Could you share a blueprint. I see the array for tags and use “Hero” for my MyCharacter blueprint, but I am also doing Multiplayer game and not sure how to go about setting up a Tag for both characters.

Sorry, I finally went using traces instead of Hit collisions so I didn’t end up implementing detections with Tags.

In your case you may want to initialize as many values (in indices) for that array as many characters you have, and for each character instance let it know which one is self so it’s not counted.

There is an easier solution.

Collision compoenents support a function called MoveIgnoreActor (C++) whcih will allow you to add an Actor instance into the list of Actors ignored by the Collision Compoenent.

In Blueprint, there is a node called ‘Ignore Actor’ that does the same thing. First you must get a reference to a collision component. Then draw a connector from it and start typing ‘Ignore’ and you will see it.

This is great, thank you!

Awesome solution to a day old headache! Thanks!

Here’s a more generalized solution that worked best for me:

Let’s say Class A is colliding with Class B, and you need to set any specific set of rules for that collision.

  1. In Class A drag all the collision events for all components (BeginOverlap event, EndOverlap event and so on) into the blueprint.
  2. In Class B make your own custom collision events, for example SelectiveBeginOverlap and SelectiveEndOverlap. Here you will put all filtering logic you need.
  3. In Class A, call the custom collision events of Class B that you just made instead of the regular ones.

I’m making a multiplayer game that requires one-way platforms as well. This was my solution! I have one parent actor that all of my one-way platforms are children of. Each character searches for all of the actors of that class in the level and builds and an array of them. On each tick the character compares the height of each platform relative to itself to decide which platforms are to be collided with and which are to be ignored. That way platforms aren’t actually turning collision on or off, each individual player is just ignoring or colliding with platforms independently!

Hope things are going well with your project, Albert!

Hey guys, I’m not sure I’m understanding everything correctly. I have two collision spheres (PunchCollision(L/R)) and I don’t want them to collide with the Capsule Component on the Actor they belong to. But other players in this multiplayer game use the same blueprint and when the character punches, I would like for his hits to land on the other players.

I tried to set it up, but I’m not sure I did it right. I hooked it onto the end of my punch event that enables collision.

Does anyone know what I did wrong?

Maybe the order of setting collision enabled but I also think that ignore when moving doesn’t work perfectly for not moving objects so yeah.