In the interest of increasing complexity of AI, I've looked to implementing behaviour which allows AI to work together. As a result, I've looked into the built-in 'AI Perception' component which offers a feature-rich solution to AI senses, of which I have seen to the configuration of sight and hearing to the AI. Previously, I had used this component exclusively with Blueprints, and had only used sight- this time around, I opted to see how I could implement this component in C++.
Implemented behaviour (in BT) for 'investigative' behaviour:
When the AI sees the player, they make a noise.
If another AI hears this noise, they will rotate to face the noise source.
In practice, this means that if an enemy attacks the player and another enemy is nearby but faced away from the player, they will face in the direction of the noise (which came from the enemy who has seen the player), from which they might be able to see the player in their field of view.
Comments