Question by
RedMoonGms · Jul 02, 2018 at 03:07 PM ·
c#scripting problemplayerenemyaifov
Enemy AI: Player attacke when in FOV
Hello everyone, I know there are already a couple of similar answers but, some were a bit old (maybe asked for unity 4) and others were a bit hard to understand, I confess. So, what I'd like to do is using some sort of "system" like PlayerCasting on the enemy AI to have enemy attacking player only when he's inside his FOV. What kind of script could I use?
Plus, I was wondering if the enemy could maybe hit doors only while player's hiding behind/beyond them (the doors should have their own health, so they break only after some hit, but I think I can do this myself).
Comment