The enemy AI i have created attacks my player which uses mecanim animations but the problem is weapon of enemy is staying inside the trigger when it attacks and instead of detecting single hit player is taking 2 or 3 hits at a time. How do I fix that so my player can take only single hit on single attack?
Thanks in advance
This is a question that is better answered by a person who knows code (not me) but I know the jest of what is needed so - I’ll give my advice freely hoping it will help.
The weapon should only do damage upon entering the trigger. If the weapon stays in the trigger it will not do damage. So there needs to be a code snippet, when the weapons leaves the trigger area the hit detection for the weapon is reset. Then if the weapon enters the trigger area again damage will occur.