# Fixed joint - not really fixed?

Hi, im trying to connect these series of cubes together as shown here :

1

The orange cube is fixed in its position, and all the other cubes (with gravity) are connected in a series of fixed joints. My problem is that the fixed joint don’t really fix the objects in their positions, but rather “dangle” around like a spring, as shown :

How do I achieve a really fixed positions with a physics joint for all the connected bodies without the dangling effect while still enabling its “use gravity” and “is kinematic” option? I’m using javascript if it concerns anything,Thanks!

Sorry for the pictures, coudn’t figure out how to post them there.

Your best option what i use a lot for certain things is either turn the solver iteration count up in physics to make joints more solid, however this will add performance drain as it effecting every joint in game.

Or what i normally use is a configurable joint lock all and then at the bottom u will find projection turn this on for rotation and position and underneath set the limits to 0, u may also have to turn solver iteration up a little depending on your setting.

Remember setting this can make objects react differently, for example i made a bike game and the back wheel had to have a little room on the projection in order for the bike to have the right feel when applying forces.

I know this question is a little old, but, if someone have the some problem, here is my solution:

• Mark all the constraints in the object’s rigidbody
• Create a CS file called FixJoint.cs
• Attach this script in the object.

The code to FixJoint.cs:

``````using UnityEngine;
using System.Collections;

public class FixJoint : MonoBehaviour {
void FixedUpdate () {
if (!GetComponent<FixedJoint>())
{
rigidbody.constraints = RigidbodyConstraints.None;
Destroy(this);
}
}
}
``````

What it does is simple:
If your object have constraints it will not move, but the joint will work.
So, it’s check if the component is attached in your object, if not, it means that the joints have broken, so, the script will clean the constraints.
After this, the script will destroy itself, cause it is not usefull anymore.

Sorry for my english, it’s not my native language.
William Borgo.

• 1st solution for this problem is to
separate fixed joint physics and its
graphics
• 2nd solution - if you cannot
separate joint from graphics you can
also make your joint stronger by
adding new one on the same object

hope these two hacks will help in your projects!

Add the objects as children. This will make them “rock solid” as they will not bend, rather rotate the entire object if it gets too heavy. In this scenario you shouldn’t keep the rigidbody on the child objects.

I’m pretty sure the configurable joint is broken. When you go too fast with 2 joints they always drag behind even if you set all the values to LOCKED, this is broken in my opinion. When you have to write a script that does what those LOCKED settings should have done in the first place something is def wrong.