I’m currently working on a game which makes use of hinges and they are doing their jobs quite well. The only issue for me is that they are constantly generating incredibly small movements which I feel must be using up CPU cycles needlessly.
I’ve tried adjusting damping and the various “sleep” settings, but all to no benefit.
Does anyone have a suggestion on how to stop this or is it just a fact of life and not really something to be concerned about?
I don’t think there are any ideal settings…the mass is relative to other objects, for example (using “1” for the mass can mean anything from ulta-massive to super-light depending on the mass of other objects), so the correct answer is probably “whatever looks right”.
Actually for performance reasons it is a good idea to think about rigidbody sleeping. That is if a rigidbody keeps jittering, it hasnt fallen asleep thus collision detection and simulation needs to be apllied. If it was sleeping no computations would be performed. Of course its not that expensive, so depending on your game it might not be real problem.
Jitter most often occurrs when you have a long chain or a circular constraint or if the system is overconstrained.
This can happen if you have two constraints which constrain in the same position and along the same axis. Having fewer joints that work against each other also helps.
If the jitter is completely invisible you should increase the sleep and angular sleep velocity.
Being that I have a fair amount of physics stuff going on in my game so far, I am on a near-holy quest to reduce CPU strain. Every cycle must earn it’s keep…