What is the correct way to setup collisions when they are controlled by complex game logic?

What is the correct way to setup collisions when they are controlled by complex game logic?

There are may be several teams in my game. In another side, there is kind of objects, that may be penetrable for characters from allies team and not penetrable for enemies (depended from runtime object setup). The most suitable variant to implement such behavior using channels seems next: use characters’ object type to provide team info and setup collisions in “penetrable” objects. Something like this:

Character collision preset

Object type: Team1Object

Penetrable collision preset

Team1Object: Overlap

Team2Object, Team3Object: Block

Looks not bad. But characters’ object type is used now only for descibed mechanism and if we’ll want to specify team Characters in context of some another category (for example, specify collisions for projectile objects, that may be object of team 1) - we will have a trouble. Object may have only one collisions type.

As I know, PhysX, that is used by Unreal, has possibility to specify user-defined delegate callbacks for collisions and ray tracing solving (that callbacks may specify, for example, if intersected colliders are ‘hit’ or not). Unreal hides this functionality and provides channel system. As I know, ignore Actos/Components system is the most flexible way for comlplex collision managing. But it’s seems that some specific architecture design should be implemented to use it properly.

So, the question is: what is the most correct, flexible and universal way for managing collisions, that are depends from complex in-game conditions?