Resfor

Discuss new features and future development.
Post Reply
Mixel
Posts: 41
Joined: Mon Feb 14, 2011 7:10 am
Contact:

Resfor

Post by Mixel »

It is annoying to implement restoring force by using two damped springs, so could a restoring force feature be added to the joints to which it is applicable?
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Resfor

Post by slembcke »

Why do you need two springs? You could probably just use a single, zero length spring. You can always create a custom joint if you want, but it's a lot easier to just use multiple joints to get complex joint behavior. Unless there is a specific performance problem

Otherwise which joints is it applicable to? Just about all of them could have something like this added. Given the number of ways that you might want a restoring force to work, configuration of an extra complicated catch-all joint would be just as difficult or more as setting up extra joints or springs.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Mixel
Posts: 41
Joined: Mon Feb 14, 2011 7:10 am
Contact:

Re: Resfor

Post by Mixel »

Could you explain how to use a zero-length spring to create restoring force?
Last edited by Mixel on Mon Feb 28, 2011 5:31 pm, edited 1 time in total.
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Resfor

Post by slembcke »

With a spring with a length, when you squish it it pushes and when you stretch it it pulls. If a spring is zero length, it will always try to pull it's two anchor points to the same place. While you can't make a real spring like this, it would be very useful if it was possible.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Mixel
Posts: 41
Joined: Mon Feb 14, 2011 7:10 am
Contact:

Re: Resfor

Post by Mixel »

Could a feature of pinjoint be added so that a force would restore the two bodies' relative positions?
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests