Search Unity

Playing animation correctly when attaching colliders to object bones

Discussion in 'Scripting' started by Jsmucker, Nov 12, 2014.

  1. Jsmucker

    Jsmucker

    Joined:
    Sep 5, 2014
    Posts:
    48
    I have an animation "run" that I am trying to play with the addition of colliders on the object's body. For this, I attached the colliders to bones to stay in place when the character would play an animation. Now, the animation doesn't play correctly. By this, I mean that the animation only plays in the bones that don't have a collider attached. Any way to fix this?
     
    Last edited: Nov 13, 2014
  2. Jsmucker

    Jsmucker

    Joined:
    Sep 5, 2014
    Posts:
    48
    I also tried moving the Colliders apart so they weren't intersecting, but that didn't fix anything.
     
  3. slay_mithos

    slay_mithos

    Joined:
    Nov 5, 2014
    Posts:
    130
    Any particular reason why the colider is not on the character itself?
    This is a genuine question, not an attempt to troll.

    Bones representing the inside of a body (animation bones, I mean), they usually don't have to interract with anything, and for the few that are completely outside of the body, they are supposed to act transparent and not affect the rest of the world.

    With that in mind, it just felt weird, so I am asking, because it seems to go against all I learned about bones in animation up to now.
    Granted, I am no expert, so there might be a very valid reason.
     
  4. Jsmucker

    Jsmucker

    Joined:
    Sep 5, 2014
    Posts:
    48
    Originally, I had a capsule collider on the character, but that was not exact enough. So I opened up the character in the scene and put the colliders on his bones. Also the model is legacy. How do you edit the animation bones?