Question about animations and Enemy Game Object structure

I’m using a zombie character from Mixamo and the animations don’t work when I add the animator component to the parent Enemy game object.

With the current structure, it says the transforms are missing (see screenshot). I understand that I could manually add the child transforms as a new property and map them accordingly, but there doesn’t appear a way to do this automatically.

However, when I add my animator component to the actual Zombie game object, everything works correctly. So I’m just wondering is it worth it having the Enemy Zombie parent child relationship or should I just have the Zombie being the only game object (along with its children) ?

Or if there’s any other suggestions that’d be great :slight_smile:

The animator usually goes on the object with the rig. It shouldn’t affect the structure of the game object. I would say always keep the model as a separate game object. It’s my opinion, but I’ve had more issues not doing it than when I have done it. One reason, for instance, is that it’s super simple to swap out the model for another when you have it separated. You literally just swap the game object. You may need to relink some objects, but that’s it. If it’s all on one thing, you have to replace nearly everything

1 Like

Not sure if this is the same approach you are mentioning but I came up with this in the meantime before seeing your reply. It seems to be effective at keeping the enemy object and the actual enemy model separated from each other. Pretty much I have an Enemy Root prefab where I create different Prefab variants containing the enemy models. As long as I have a direct parent child relationship, the animation does actually appear to be working correctly. Whereas before I had Enemy, Body, and then the Rig game objects (Grandparent-Parent-Child) which seemed to cause my initial issue.

Thank you for your input :slight_smile:

image

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

Privacy & Terms