Search Unity

Hinge joints break when moving fast?

Discussion in 'Editor & General Support' started by TylerPerry, Feb 4, 2012.

  1. TylerPerry

    TylerPerry

    Joined:
    May 29, 2011
    Posts:
    5,577
    I’ve been working on a game but it has a string of ridged body’s all connected with hinge joints... but! When they move quickly it breaks and they all go mental? They fix them self’s overtime but I need it to just not do it ever.

    I was using function Update but I changed to Fixed Update as that was recommended because someone said it could be due to frame rate.

    My break force is infinity so that can’t be it.


    This is a webplayer if you just move your mouse around crazily you should be able to see the problem: hear

    Any help would be great, thanks :D
     
  2. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    The more hinge joints you have in a row, the more unstable it gets, that is expectable, especially with high accelerations.

    You have some options that may improve the stability.
    - Increase the Physics Solver Iteration Count.
    - Or use a lower Fixed Timestep.
    Keep in mind that those two heavily influence the performance.

    - Try different limits and spring values (you probably aready did that).
    - It may help if you reduce the weight for rigidbodies that are added later on.
    - The friction of your physics material seems very high. You may try to use higher drag for the rigidbodies instead (not sure about that one).
     
  3. foxter888

    foxter888

    Joined:
    May 3, 2010
    Posts:
    530
    instead of putting infinity on the break force try putting a number there and see if it will do something, i have a friend which i helped using hinge joins, so we pretty much made a whole tail with 13 joints for a wolf lol
     
  4. Dantus

    Dantus

    Joined:
    Oct 21, 2009
    Posts:
    5,667
    @foxter888, 13 joints! Impressive!
     
  5. foxter888

    foxter888

    Joined:
    May 3, 2010
    Posts:
    530
    it was tedious to set up so the best way to do it was to make an array of rigidbodies and iterate through them to minus one being the connected body. still we had to set some extra colliders for it to work properly.

    looks cool on zombies if you for example but a bone on their jaw and put a hinje joint in there it will swing all over the place like a crazy dislocated jaw, cool efects where on one of the foots and etc.
     
  6. TylerPerry

    TylerPerry

    Joined:
    May 29, 2011
    Posts:
    5,577
    Thanks for the advice guys :D i changed the Timestep to 0.0025 and it only droped around 5 FPS but works much better.

    This is the link to the web build :D

    I had 19 hinge joints :D