FOV Auto-Aim Part 2: Multiple Enemies
In this tutorial we extend the previous example to include the ability to target and destroy multiple enemies depending on proximity.
This is achieved by managing a list of enemies in the scene and targeting the one that is closest to the player.
Auto-Aiming in 3D Space Using Player’s FOV
In this tutorial we take a look at using a player’s field of view (FOV) to detect whether or not it can see an enemy. If the player can see the enemy then they automatically aim towards it.
This is achieved by attaching a simple script to the part of the player that needs to rotate towards the enemy and letting it know what the enemy GameObject is, where the FOV should eminate from, the speed of the rotation and the angles that limit the FOV .