Make bullets not check collision against each other, but hit everything else?

Hey guys,

So the bullets in our project are physical objects that do a non-physics collision (don’t want them to push the target around, just trigger the ‘OnHit’ event). We don’t want them to collide with each other, however, nor have the check in the first place (rather than checking if the hit object is a bullet or not), in order to lessen the computational load. Is this custom collision channels or something else? In short;

How do I make my bullets check collision with everything BUT other bullets?

Thanks.

Hello,
If you have a node other actor on your event compare it with the actor bullet and use it as a bool condition in a branch to do collision or not.

The problem with this is that the computation is still occurring - every bullet is checked against every other bullet, and then it’s decided whether the ‘Other Actor’ is a bullet. Instead, it should never do this check.

You can set the collision of the bullet to ignore other projectiles.

This is more along the lines of what I was hoping for. Do you have any further information?

This might help with what you’re after:

This is exactly what I was talking about, thanks OriginalBigDan!

If you go into the collision settings of the mesh, ensure that your object type for the bullet is projectile, and that the object response for projectile is either overlap or ignore, depending on your needs.

Thanks, OriginalBigDan! Great resource.

I can’t see a ‘projectile’ setting for object type.

EDIT: Ignore the other settings; they’re not set right yet.

NoProjectileCollisionSetting.png

EDIT #2: Seems to work now (had to restart editor to see the new channels. For some reason, though, my bullets only collide with things if in its BeginPlay, I set collision off, then immediately set collision enabled again. If I don’t do that, it’s like it never sets it up, and they don’t generate hit events.