- Home /
Configurable Joint - What does Position Spring and Damper mean?
So I discovered that Configurable Joints can allow me a bit more control over my rigidbody Character Controller than I originally expected.
But now I have to actually make it work. I figure setting target velocity wouldn't quite get that perfect effect I'm looking for, so I want to try some other ideas instead.
But I can't figure out what [i]exactly[/i] Position Spring and the Damper do. I know they "rubber band" the rigidbody to a spot and cause resistance to rubber-banding, but what exactly does it mean mathematically?
Am I just hopeless at this point?
Answer by duck · Oct 09, 2010 at 07:11 AM
The position spring and damper affect the force which tries to keep your rigidbody pinned to a certain spot. This spot could be another rigidbody (if you have set the connected body to another rigidbody), or a world location (if you have not).
The spring value affects the strength of the force applied proportional to how far the object is away from its intended spot - so this is basically how strong the spring is.
The damper value affects the momentum of the spring, which is basically its dendency to overshoot and oscillate back and forth. A higher value for the damper will make the spring come to rest much faster, whereas a low damper value will allow it to twang back and forth for a longer time before eventually coming to rest.
In this way, the 'damper' value acts like a shock absorber, taking force out of the springs movement.
However, you mentioned "that perfect effect", but you haven't actually described what you're trying to do! so while this information about joints might be useful, I can't help you any further with the effect you're trying to achieve!
Ah, thanks for that explanation. I suppose position could work if I knew how to set it the right way.
What I'm trying to do is make a Character Controller which can fully interact with physical objects, be oriented to any direction for gravity, and keeps motion/force relative to other outside forces acting on it (surface it's standing on, or wind blowing against it or something).