Resfor

Discuss new features and future development.

Resfor

Postby Mixel » Mon Feb 28, 2011 9:58 am

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?
Mixel
 
Posts: 41
Joined: Mon Feb 14, 2011 7:10 am

Re: Resfor

Postby slembcke » Mon Feb 28, 2011 10:32 am

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

Re: Resfor

Postby Mixel » Mon Feb 28, 2011 11:15 am

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.
Mixel
 
Posts: 41
Joined: Mon Feb 14, 2011 7:10 am

Re: Resfor

Postby slembcke » Mon Feb 28, 2011 12:21 pm

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

Re: Resfor

Postby Mixel » Mon Feb 28, 2011 5:33 pm

Could a feature of pinjoint be added so that a force would restore the two bodies' relative positions?
Mixel
 
Posts: 41
Joined: Mon Feb 14, 2011 7:10 am


Return to Features/Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron