Body connected to pivot joint not attenuating

Discuss new features and future development.
Post Reply
tocali
Posts: 2
Joined: Tue Feb 11, 2014 11:20 am
Contact:

Body connected to pivot joint not attenuating

Post 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
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Body connected to pivot joint not attenuating

Post 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.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
tocali
Posts: 2
Joined: Tue Feb 11, 2014 11:20 am
Contact:

Re: Body connected to pivot joint not attenuating

Post 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?
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Body connected to pivot joint not attenuating

Post by slembcke »

Yep. That's it.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests