Search Unity

Choosing specific bone(s) to apply animations to in a prefab?

Discussion in 'Animation' started by Mipmap, Sep 20, 2014.

  1. Mipmap

    Mipmap

    Joined:
    Aug 22, 2013
    Posts:
    4
    My goal was to have a hatch that the player can open and close, but also cause visible damage to and eventually destroy. I did the open, close and damage animations in one timeline, and separated them into clips in Unity with the masks set to uncheck the "hinge" bone during damage animations.

    My door opens and closes fine, and if I damage the door I see the animations correctly as well. However - If I open the door after being damaged it seems use either the open, close or damage0 animation to return to appearing undamaged. It seems any time the open\close animations are used the damage state animations are reset. I've also edited the animation masks in the FBX import options to not use the "hinge" bone on any of the damage animations, but this didn't seem to help.

    How can I have my animation (controller) only use the "hinge" bone to move the entire door during the open\close phases, and have all the damage animations ignore it during the damage phases so that their animations can play without trying to close the door again?

    The big frustration is that it feels like its ignoring the animation masks in the import options. The open\close animations only use one bone which never is keyframed in the damage animations. So its seems very crazy that doing the open animation causes these other bones to move at all.

    I attached a screenshot of the basic layout of the animation controller. It uses a simple "IsOpen" true\false game value to determine whether the Open or Close animations are played, and a 1-10 game value to decide which damage animation to play.

    Any help would be greatly appreciated, or even a simple example of how to these animation states stick to using certain bones.
     

    Attached Files: