This project has moved and is read-only. For the latest updates, please go here.

linear spring maximum stretch

Topics: Developer Forum, User Forum
Oct 20, 2007 at 5:38 AM
Is there any way to set the maximum stretch distance for a linear spring? I'm trying to add rope bridges to my level editor, which works ok as long as I have stiff springs, but I'd like to limit the amount of stretching independently of the stiffness of the spring.
Oct 20, 2007 at 3:16 PM
Edited Oct 20, 2007 at 3:17 PM
the only way i can think of is to also add slide joints with limits wherever the springs are.

Or, use the slide joints INSTEAD of springs. They are much stiffer.
Oct 21, 2007 at 4:49 AM
actually the point was to make them less stiff, but with a maximum limit to their stretching. It's ok though, just a bit of tweaking and the rope bridges work fine.
Oct 25, 2007 at 9:53 AM
Jero, mind posting the settings you used?
I can't seem to get a decent rope bridge no matter how hard I try. It always seems too lose and I can't get it tight. Sure, I could use a slider like Crash suggested, but then it's too stiff and you lose the elasticity that a rope bridge should have.

Oct 29, 2007 at 12:16 PM
Well, I'm using a spring constant of 40 and a dampen factor of 5, but that was too loose too. I eventually had to put multiple springs until it felt right lol. I didn't quite get the perfect combination of properties. Someone suggested that I also use overlapping bodies between the bridge planks that didn't self collide with the bridge or themselves but still collided with the player, to make it easier to walk on, but I haven't tried it (it would have been too difficult to add to the editor in a general way).
Oct 29, 2007 at 5:45 PM
You shouldn't need multiple springs. I think for any set of multiple springs there exists a single spring that is equivalent. It's just a matter of tuning it. That said, whatever works, use it. :-)
Nov 5, 2007 at 3:21 AM
Is there any documentation on the slide joints? I'm trying to simulate a rope, which I figured would be a series of really stiff springs, but you mentioned slide joints being stiffer so I'd like to know more about them.
Nov 5, 2007 at 5:39 PM
For a rope you should probably just use RevoluteJoints to connect a bunch of segments together.