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
Body connected to pivot joint not attenuating
-
- Posts: 2
- Joined: Tue Feb 11, 2014 11:20 am
- Contact:
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: Body connected to pivot joint not attenuating
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/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
-
- Posts: 2
- Joined: Tue Feb 11, 2014 11:20 am
- Contact:
Re: Body connected to pivot joint not attenuating
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?
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?
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: Body connected to pivot joint not attenuating
Yep. That's it.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Who is online
Users browsing this forum: No registered users and 3 guests