Ignoring physics collision between meshes or actors

I have the main player equipped with a sword and when the player slashes a particular enemy, it gets destroyed into pieces. However the those pieces have a physics collision and problem is when the player steps on it, it makes the player go crazy, it starts bouncing and… I think u know what I mean.
Anyways, can someone please help me? I wanna be able to have a collision ignore a physics collision on the other static mesh or an actor.
Thank you.

Hey @iansky1.

Good question! This is going to depend on how you are getting the enemy to fall to pieces, but you should have a couple of good options.

If you are generating meshes with the pieces of the enemy, you should be able to either change its collision or set “character can step up” to false. If you are working in blueprint, you can add a reference to the mesh and use a “Set Character Can Step Up” node after the logic that makes the character fall apart, and set it to false. Alternatively, to keep the pieces from causing any other physics havoc, use a “set collision response to channel” node and set its response to “pawns” to “ignore”.

I hope one of these solutions works for you! Good luck!

Hey, thanks for replying, however, I’m using a destruction plugin forgot it’s name. I wanna know how to make a collision be able to collide with other collisions with physics except the player capsule’s collision where it would just ignore it as if the collision doesn’t exist.

Hey @iansky1,

Maybe a custom collision channel would suit your needs. For this purpose I would make a channel for your broken meshes, maybe call it debris. To make a channel, go to Project Settings > Engine - Collision and click Add, name it Debris. Set the default response to block.

Next, get the capsule/collision component of your player and go to its collision settings. Check the ignore box in the debris row.

Finally, we need to change your mesh to Debris after it gets broken, that way its interactable up until that point. To do that, you need to use the node “Set collision object type” and set the channel to Debris. If you are using chaos destruction, you can use an “On Chaos Break Event” to call this node.

I hope this works for you!