AI perception system rework


Hey everyone, I'm back with new devlog after a while.

I wanted to talk about the changes I made to the AI's perception system and why they were necessary. First of all, I need to discuss the previous way the enemy AI detected entities. It had a trigger sphere collider with a large range that would detect the player or other AIs on collision enter and then would lose interested in then once they were in a certain stipulated distance. 

The reason why I felt the need to change was the unreliable way the detection was handle, happening only when entering the collider and furthermore, the possibility this system had to detect targets through walls and other obstacles.

My solution was to ditch the collider and instead use an overlap sphere that would take all entities in a certain distance in an angled FOV hemisphere and would also do a raycast in order to see if there isn't any object obstructing its view of it.

Thanks for the attention, stay safe, and see you in the next log!

Leave a comment

Log in with itch.io to leave a comment.