Animator Override related bug for enemies

If I give any enemies a weapon that has an AnimatorOverrideController, they don’t “Die” properly on loading. They have 0 health and don’t do anything but are in idle animation instead of lying on ground like the dead unarmed enemies. This is somehow related to the runtime animator controller because if I manually set the animator to the proper weapon override controller on the enemy in question (instead of the default Player Animator Controller) then the bug goes away. So I’m guessing that Die() is setting a trigger on the wrong Animator Controller but I can’t figure out how to solve it without Health having to know about Fighters and Weapons, etc.

If this is solved later in the course, please let me know and I’ll not worry about it for now. Thanks.

Note: this is ‘solved’ in a couple lectures (Saving Weapon Choice). My guess is that by having characters re-equip their weapon on load, that process properly sets the animator controller so that the Die trigger is now set in the correct place.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms