Hi.
I want my enemy characters can take cover behind obstacles. i use unity engine and for do that i added two trigger at left and right of obstacle like below picture. also i wrote some code to find these triggers and after found closest of them move to it and play take cover animation. but some times after come to trigger, it don't work correctly. seem some part of my work is incorrect and i need know this way is correct or not? if it's not correct dose someone can explain me how do that?
Thanks.