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

How to prevent joints from separating from their anchor points?

Discussion in 'Physics' started by guitarxe, Jan 8, 2015.

  1. guitarxe

    guitarxe

    Joined:
    Dec 1, 2013
    Posts:
    131
    I am trying to create something that at least passes for a chain made of links. I am having an issue in making sure that the individual chain links to do not separate from each other.

    This is what I mean:
    http://gfycat.com/PeacefulUnhappyHornbill

    Each capsule has a RigidBody and a ConfigurableJoint with the following settings:


    I've been wrecking my head about how to accomplish this for 2 days now and would appreciate any help.
     
  2. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,547
    Hi,

    Enable "Projection" in the joint and adjust "Projection Distance" to as high as tolerable.
    Note that projection is not "real physics", it will just translate the bodies to the anchors after the physics simulation, so it might spawn some additional problems for you.

    Also try reducing the mass of your links and the ball.

    Cheers,
    Pärtel
     
  3. Partel-Lang

    Partel-Lang

    Joined:
    Jan 2, 2013
    Posts:
    2,547
    Oh, and of course, increase Solver Iteration Count in the Physics Settings and make the fixed timestep smaller.
    Btw, you can increase Solver Iteration Count for selected objects only using Rigidbody.solverIterationCount.