So I started making a 2d top-down shooter game. In essence there are 3 teams, red, green and blue. Currently, the AI on each unit makes it turn right if an enemy is right, and turn left if an enemy is left, using radar sensors. Also, colliding with a bullet that from an enemy does damage to the unit. The problem is that each unit has 13 radar seniors, including 3 for dealing with walls, and 6 collision sensors for the 3 types of damage. Because of this I can only have about 7 or 8 units per team, as 80-90% of the processing does through the physics engine. Also, I would to, at some point, add more teams (ie. more colors), which would mean each unit could have a couple dozen radar sensors, which is too many.
What I am looking for is a way to combine radar sensors, ie if there is a RedUnit or GreenUnit to the right, turn right, rather than 2 separate sensors. Another option is to make the units look for objects with a value on a property, ie if it is on your team or not. A third option is to make the sensors look for objects with a property but not a material (as each color/team uses a separate material).
Any advice will be lovely