Body connected to pivot joint not attenuating

Discuss new features and future development.

Body connected to pivot joint not attenuating

Postby tocali » Tue Feb 11, 2014 11:28 am

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
tocali
 
Posts: 2
Joined: Tue Feb 11, 2014 11:20 am

Re: Body connected to pivot joint not attenuating

Postby slembcke » Tue Feb 11, 2014 2:42 pm

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

Re: Body connected to pivot joint not attenuating

Postby tocali » Tue Feb 11, 2014 5:56 pm

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?
tocali
 
Posts: 2
Joined: Tue Feb 11, 2014 11:20 am

Re: Body connected to pivot joint not attenuating

Postby slembcke » Tue Feb 11, 2014 11:54 pm

Yep. That's it.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
User avatar
slembcke
Site Admin
 
Posts: 4164
Joined: Tue Aug 14, 2007 7:13 pm


Return to Features/Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron