I’m developing a space combat based game and can’t figure out how to make the turrets aim at a target, but only when they are in its field of view. Yes, I have looked around and could not find anything the same as what I’m looking for.
So say I have a turret on both the top and bottom of a ship and I want the viewing angle to be 200 degrees horizontally. When an enemy is withing that 200 degree angle I want the turret to look at the enemy. The later mentioned is simple, but I can’t understand a way to get a viewing angle. Thanks for the help in advance!