Page 1 of 1

Body connected to pivot joint not attenuating

Posted: Tue Feb 11, 2014 11:28 am
by tocali
Hi,

I have two bodies (one is static) which are connected with a pivot joint. I set a gravity. Very basic stuff.

The problem is that the "dangling" body never stops swinging completely.

Why is that?

Thanks
tocali

Re: Body connected to pivot joint not attenuating

Posted: Tue Feb 11, 2014 2:42 pm
by slembcke
Things slow down in the real world because of friction or drag and your system has none. If yo want to simulate the mechanical drag of the bearings of the pivot, that is pretty easy to do with a cpSimplMotor with a rate of 0 and a maxForce set to the desired amount of friction.

Re: Body connected to pivot joint not attenuating

Posted: Tue Feb 11, 2014 5:56 pm
by tocali
Thanks!

I have connected the two bodies with a cpSimpleMotor now (additionally to the cpPivotJoint), set the rate to 0 and maxForce properly. Then I add this constraint to the space. Everything seems to work correctly. Is that the right way to do it?

Re: Body connected to pivot joint not attenuating

Posted: Tue Feb 11, 2014 11:54 pm
by slembcke
Yep. That's it.