Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Stop Animation From Playing On Character's Limb

Discussion in 'Animation' started by cherokeelakes94, Oct 31, 2022.

  1. cherokeelakes94

    cherokeelakes94

    Joined:
    Jan 22, 2015
    Posts:
    3
    Hello. I am using a character that is separated in several parts: Head, Torso, Upper Left Arm, Lower Left Arm, Upper Right Arm, Lower Right Arm, Left Leg, Right Leg and so on. This character was animated in Mixamo. I am wanting to implement removeable limbs. My initial thought do this was to stop the animation from playing on one the cut off piece and then use physics to control it from there. I cannot figure out how to stop it from playing on any of the individuals meshes though. Unparenting it from the character does not work and neither does setting the root bone of the Skinned Mesh renderer to null. I can delete the bone associated with the mesh, but the scaling and position then of the mesh is off. Any suggestions on how to approach this?

    Thanks
     
  2. tcz8

    tcz8

    Joined:
    Aug 20, 2015
    Posts:
    504
    I’ve been looking into this, and although I haven’t tested it myself, I believe you’re looking for animator.Rebind().

    Un-parent the limb, run the command, and the animator should discard it. I’m hoping it also allows reconnecting to the animation by re-parenting the limbs.
     
    Last edited: Nov 24, 2022