Search Unity

  1. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Let us know a bit about your interests, and if you'd like to become more directly involved. Take our survey!
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

How can i prevent ragdolls from stretching and spazzing out?

Discussion in 'Physics' started by Nanako, May 26, 2015.

  1. Nanako

    Nanako

    Joined:
    Sep 24, 2014
    Posts:
    1,047
    I've made a ragdoll teddybear. I used the ragdoll wizard a little initially to see how it works, but it wouldn't take an armature with only 7 bones, so i ultimately made this myself, with colliders, rigidbodies, and character joints, on each part.

    As long as i move this little guy around slowly, and don't get him caught on things, he's fine;



    But if i move him too fast, or swing him around in a way that part (not all) of him hits an object, bad things happen.



    My best guess at what's happening here, is that high forces are sending the limb rigidbodies flying, and they get caught on something in the scene, preventing them from coming back.

    But i don't understand HOW this can happen. The character joints have a breakforce set to infinity, so surely that should prevent them from going any distance from their starting point, no matter how much force they're under?

    The right leg in this case flew about 100m and got stuck behind a little hill in the distance.

    Probably relevant, here's the full inspector readout for that right leg (most of these values are just defaults)

     
  2. Robert-HGG

    Robert-HGG

    Joined:
    May 27, 2015
    Posts:
    10
    I am struggling with the same issue for days. I've tried everything and there is no fix other than limiting ragdoll speed!

    Ragdolls are broken and extremely unstable in Unity 5.
     
  3. Nanako

    Nanako

    Joined:
    Sep 24, 2014
    Posts:
    1,047
    I've found a solution which seems to work perfectly now. Enable projection on the character joints.

    default settings just magically made the problem go away.
     
    TvhE, chingwa, Wothanar and 7 others like this.
  4. MaiJingNan

    MaiJingNan

    Joined:
    Jul 24, 2016
    Posts:
    1
    thanks Nanako,your help work for me
     
  5. wesleywh

    wesleywh

    Joined:
    Jun 8, 2014
    Posts:
    1
    Tried this and it worked like a charm for me. Thanks for the post!
     
  6. sdclark79

    sdclark79

    Joined:
    Feb 6, 2017
    Posts:
    16
    I could be wrong, but I'm pretty sure this is a collision issue. I've had a similar issue with ragdolls, and the issue ended up being resolved by working out layer collisions in Edit->Project Settings->Physics
     
  7. FuzzyShan

    FuzzyShan

    Joined:
    Jul 30, 2012
    Posts:
    165
    None of these works in high speed collision impact, setting max depentration velocity helps, but it would cause some other issues, such as ignore collision impact.
     
  8. Plystire

    Plystire

    Joined:
    Oct 30, 2016
    Posts:
    141
    Ragdolls don't normally behave the best when paired with high velocity.
     
  9. HOEB

    HOEB

    Joined:
    Mar 31, 2017
    Posts:
    1
    Thanks Nanako. It worked fine for me.
     
  10. Jasmin1347

    Jasmin1347

    Joined:
    Jan 24, 2018
    Posts:
    2
    Thanks Nanako. It working fine.:)
     
  11. TheGameLearner

    TheGameLearner

    Joined:
    Feb 10, 2018
    Posts:
    2
    Thanks @nanako.693001, I was able to use your enabling option.... saved me tons of work.
     
  12. NathanJSmith

    NathanJSmith

    Joined:
    May 11, 2018
    Posts:
    23
    TheGameLearner likes this.
  13. joeyether40

    joeyether40

    Joined:
    Jan 26, 2018
    Posts:
    11
    How do you enable character joints . I am also having this stretching issue with my character
     
  14. Wothanar

    Wothanar

    Joined:
    Sep 2, 2016
    Posts:
    39
    thank you so much it worked for me