The question is answered, right answer was accepted
Death Animation Playing On A Different Enemy I Shoot
Hi.
I am instantiating enemies on 3 different spawn points. Let's name them Enemy A, Enemy B and Enemy C for the sake of this question.
Sometimes, when I shoot Enemy A, the death animation plays on Enemy B or Enemy C. However, the damage is actually absorbed by Enemy A. This means that Enemy A stays in the idle animation and gets destroyed after 10 seconds. If I then go near Enemy B or Enemy C, they then follow me and try to attack me while being in the death animation.
I am making all of this work by instantiating them via a prefab.
I would appreciate any given help and please let me know if you require any additional information.
Regards!
Wave Spawner Properties:
Enemy Properties (disregard the empty target as that is not the issue):
Answer by Vendrict · Apr 19, 2019 at 12:38 PM
Fix:
I had the animations set as static and they were being adopted by all prefabs.
To eliminate this problem simply change the static to public or private.
Follow this Question
Related Questions
How to make AI avoid walls etc ? 1 Answer
Raycast to play animation 1 Answer
Raycast never gets called 1 Answer
Raycasting an object with Oculus 0 Answers