Hinge joint jitter

Hey all,
I’m having a bit of trouble with getting my hinge joints to act nice. They’re working, but not perfect.

I’ve put hinges on the doors and hood of a car GameObject. If the door/hood objects are children of the car object, there’s no jitter and everything looks just peachy. However, if I move the objects out of the car object and let them be on the same level, they get all jittery as the car moves around. The ‘Connected Body’ property of the hinge joint is set to the car object (which has a rigidbody attached to it).

My guess is that if you keep the objects as children to the car, whenever the car moves, the objects move along with it. There’s no need to move them through the same space as the car. But once they’re out on the same level it’s like the hinged objects get moved only every other frame.

The reason for me keeping the doors and hood outside the car model is that I want the joints to be able to break. And if they’re children of the car object they will move along with the car, even though their not attached to it (a strange sight).
I’ve uploaded a video to demonstrate how it looks right now:
http://pray.se/unity_hinge_jitter.mov
For comparison, the left door is a child of the car model, while the right door and hood are on the same level as the car.
Here’s a screenshot showing the object hierarchy:
http://pray.se/unity_hinge_jitter.png

I’d be really grateful for any help with this!

EDIT: Solved it! I had to let the rigidbody interpolate. So now it’s totally sweet.

3 Likes

lol, i came by this on accident. It totally helped me as well. I was having issues with the turret on a tank being jittery when in motion. As it turns out the rigid body on the main part of the prefab had no interpolation.

1 Like