Narrowing the AI's FOV to allow attacks from behind
In this recipe, we will be showing you how you may be able to manipulate the AI's primary and secondary FOVs to allow the player to have an easier time to sneak up on the AI from behind.
- Before we begin, you must have Sandbox 3 open
- Then open
- Complete the Placing the Enemy AI recipe
- Change the following entity parameters on the AI Grunt that is placed:
- Perception sub rollout
- FOVPrimary = 40
- FOVSecondary = 80
- awarenessOfPlayer handles if the AI knows where the player is at all times. Making sure this value is false makes the AI do perception checks to see if it can find the player.
- FOVPrimary handles the main FOV of the AI ...