Search Unity

Animation Override issues

Discussion in 'Animation' started by Renegade_Wolf, Apr 18, 2022.

  1. Renegade_Wolf

    Renegade_Wolf

    Joined:
    Jan 17, 2022
    Posts:
    38
    Hi all -
    So I've created some animations in Blender that work well (except, for some reason, the additional bones to control a cloak don't appear to be doing anything).

    In one layer I've got those animations. In an overriding layer (the layer below), I have some animations that control the player's weapon - little more than that, for the most part. Animation plays, new weapon is equipped.

    In this layer, I've been trying to create a series of substate machines such that I can equip a new weapon, go into the substate machine, and then from the weapon's "isEquipped" state I can activate other, more complex, weapon-specific animations.

    However, upon activating such an animation - another from Blender - it controls bones, rather than just activating and deactivating weapon gameobjects. And herein lies the problem: after this animation has played, all of the bones go into a basic import state - my main animations are being overridden.

    If I set the Weapon layer weight to zero, it stops affecting which weapon is equipped. I don't want to put weapon-equip in the same layer as my main animations because, as they are baked, I would need to bake all animations for each equipped weapon, so the weapon stays equipped when performing a task common to all weapons such as jumping.

    Currently, the way my weapon animation works is just by deactivating irrelevant gameobjects and activating the relevant ones. Anyone have any thoughts as to how I could get around this issue with my animations being overridden by what should be non-animations? If the situation is unclear I'm happy to provide more details.
     
  2. Renegade_Wolf

    Renegade_Wolf

    Joined:
    Jan 17, 2022
    Posts:
    38
    Resolved: I made the attack animation layer a separate override layer from the equip state animations. For some reason it seems that if you override any bones and then perform any override animation, ALL bones that you overrode remain overridden, even if the current override animation does not affect those bones. Bit of a weird situation but I figured my way around it.