Search Unity

Bug Ragdolls 'exploding'

Discussion in 'Physics for ECS' started by Lukas_Kastern, Jun 1, 2021.

  1. Lukas_Kastern

    Lukas_Kastern

    Joined:
    Aug 31, 2018
    Posts:
    97
    Hey I've noticed that ragdolls randomly explode. With that I mean that some ragdolls seem to create a force out of nothing. Here's a video that showcases the effect I'm seeing.

    This only seems to happen when adding a initial force to the ragdolls. Using havok physics as the backend fixes the issue.

    Another interesting thing I've noticed is that this only happens when I set the Fixed timestep to 30 ticks per second with the default 60 it's working fine. Is this a known issue or should I report a bug?
     
    Last edited: Jun 1, 2021
  2. steveeHavok

    steveeHavok

    Joined:
    Mar 19, 2019
    Posts:
    481
    It's not necessarily random if you are applying forces, especially if that force pushing a ragdoll part into the ground (leading to a strong interpenetration resolution force).
    Also worth noting that your ragdoll parts have space between them. This can lead to collision fighting scenarios with part of a limb on one side of a wall and another part one the other. I recommend overlapping the ragdoll parts and ensure that collisions are disabled between them.
     
    Lukas_Kastern likes this.
  3. Lukas_Kastern

    Lukas_Kastern

    Joined:
    Aug 31, 2018
    Posts:
    97
    Thanks for the response. Making the ragdoll parts overlap didn't seem to help. The collision between the different parts was already disabled if I remember correctly.
    I was also able to reproduce it without adding the initial force so that the only other force would be gravity.
    The ragdoll was created with the standard unity ragdoll creator wizard but I guess something is odd with the joint/rigidbody setup,

    I'm going to try the sample ragdoll that gets generated from code and see how that goes. Maybe I can just use that one instead.
     
  4. steveeHavok

    steveeHavok

    Joined:
    Mar 19, 2019
    Posts:
    481
    In that
    Interesting, if its not a collision resolution issue, then it might be a joint limit resolution issue but I would have thought all ragdolls would have the same problem. Can you replicate the problem with a single ragdoll rather than in a pile?
     
  5. Lukas_Kastern

    Lukas_Kastern

    Joined:
    Aug 31, 2018
    Posts:
    97
    It's very strange, it doesn't happen to all the ragdolls. I've uploaded another video that shows how the same two ragdolls have that behavior but as soon as I disable one of them and go back into playmode it works fine.

    That's the project in case you want to take a look.
    The scene I used to record is called Ragdoll inside the assets root.
     
    steveeHavok likes this.
  6. sls_jonas

    sls_jonas

    Joined:
    Sep 30, 2017
    Posts:
    1
    Hey, just want to add that we are seeing issues similar to this as well, when applying forces to our ragdolls they sometimes break in a similar fashion to the video Lukas shared. The larger the force, the more common it is but it happens with relatively small forces as well. We are also able to reproduce this in the ragdoll scene of the Unity physics samples by just applying an impulse to the currently "picked" body, I have attached a gif of this. Our only edit here is applying an impulse when a button is pressed, the ragdoll setup has not been altered.

    We have remedied this issue a lot by spreading forces over all/many bodies in the ragdoll instead of applying it to just one and generally keeping forces as low as possible, but it still happens once in a while.

    EDIT: This is without Havok backend and in 60 FPS, however the lower the FPS the more it seems to happen.
     

    Attached Files:

    Last edited: Jul 14, 2021
    Phalanxen and Lukas_Kastern like this.
  7. Lukas_Kastern

    Lukas_Kastern

    Joined:
    Aug 31, 2018
    Posts:
    97
    Hey, @steveeHavok did you have a chance to take a look at this?
     
  8. sl1nk3_ubi

    sl1nk3_ubi

    Joined:
    Aug 21, 2019
    Posts:
    16
    Any news on this one?
    We're hitting this bug 100% on some mobile devices (but funny enough, not all of them) and can also easily reproduce the bug in editor by simply setting a non normalized rotation on any bone or decreasing the iteration count.
    So far we have managed to mitigate the bug with increased drag and other hackish checks, but it's far from perfect.
     
  9. MorganYT

    MorganYT

    Joined:
    Jul 29, 2017
    Posts:
    31
    The same thing happens to me, after the collision everything is normal. But a second later the ragdoll takes off.
     
  10. elJoel

    elJoel

    Joined:
    Sep 7, 2016
    Posts:
    125
    I had similar issues where the problem was that the "floor" collider was very large, making it smaller helped
     
  11. MidnightCow

    MidnightCow

    Joined:
    Jun 2, 2017
    Posts:
    30
    FWIW I've also had a similar issue, after resizing the floor ( box collider ) very large, ragdolls started popping off ( ecs 0.51 ).