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

Ragdolls affecting animations (Making the animations jumpy and 'weird')

Discussion in 'Animation' started by TeamDefiant, Aug 27, 2019.

  1. TeamDefiant

    TeamDefiant

    Joined:
    Mar 29, 2017
    Posts:
    50
    I'm having an issue with my rag-dolls.

    On the left is a character with an animator. As you can see, it works as expected. The character animates and all body parts are oriented the correct way.

    On the right is the exact same prefab, but with a rag-doll in place. (I went through the rag-doll wizard to add rigid bodies, colliders, and character joints. Then in code, the colliders are set to be triggers and rigid bodies set to not use gravity so that they won't affect anything whilst not 'rag-dolling')

    As you can see, the rag-doll enabled characters head is jumping, the right arm is rotated backwards, and the whole things has a 'gangster lean' going on.

    What can I do to allow for the animations to work, but still have the ability to rag-doll when a certain condition is set. (The actual rag-dolling is working, it's the non-rag-dolly bit which isn't)

    Here's the video showing the problem...
     
  2. TeamDefiant

    TeamDefiant

    Joined:
    Mar 29, 2017
    Posts:
    50
    Never mind, I've fixed it. Setting the rigidbody to kinematic when instantiating the prefab seems to have fixed it. (Don't forget to turn Kinematic off when ragdolling!)
     
  3. diegodimap

    diegodimap

    Joined:
    Jun 4, 2017
    Posts:
    6
    Thanks, it solved my problem! I had an enemy fully programmed and I added ragdoll... my animations became weird. Tought my work was lost :)