Hi All, I thought I will share the little eyesight script for AI Characters in the RPG game. It checks if the AI Character has the target in sight, in range and that nothing is blocking the view of the player.
It makes it possible for the player to sneak up on AI Characters and hide behind buildings and walls.
Check it out here on GitHub:
https://github.com/JimmyBoon/Unity-Eyesight
It’s my first time sharing code on GitHub, so sorry if I have made some mistakes. But I am keen to see if this helps anyone improve their game.
Cheers
James