Spring constant for a rigid body joint. Modifiable?

Physics APIs, Physics file formats, Maya, Max, XSI, Cinema 4D, Lightwave, Blender, thinkingParticles™ and other simulation tools, exporters and importers
movrev
Posts: 2
Joined: Wed Oct 22, 2008 11:02 pm

Spring constant for a rigid body joint. Modifiable?

Post by movrev »

I'm in the process of building an actuated robot in blender, using rigid body joint constraints just like in a ragdoll to connect all of my rigid bodies and actuate them relative to each other.

Now, I would like to be able to modify the spring and possibly the damping constant of any of these joints as the simulation (in the game engine) is running.

There are two ways I thought of for achieving this. One comes from this other thread, in which someone proposed modifying the distance of the constraint from the object or even the object masses to affect the springiness of the joint. The other way was to emulate the spring constant through control, by modifying the torque and velocity in a simple or servo motion actuator.

However, none of the above methods is optimal and I wondered if you guys know of any other way to make this work. Getting access to the spring constant directly would be perfect, but even constructing a more complex joint would suffice, if it worked (like for example joining each rigid body to a "knee" soft body of which one could have access to the linear stiffness).

Let me know if you have any other ideas or there's something I'm missing.

Thanks.