Hinge2 spring

bonjovi
Posts: 35
Joined: Mon Jul 20, 2009 12:58 pm

Hinge2 spring

Post by bonjovi »

Hi,

I'm trying to use the Hinge2 joint and i don't understand the relation between general Spring constants (F=-Kpx-KdV) and the setStiffness/setDamping functions.

It seems that a setDamping(0) makes the body to stop quickly near its equilibrium position, whereas setDamping(100000) makes the body to oscillates indefinitely (it is exactly the inverse of the -Vdt member).

Also, using setStiffness(98.1), that should make the body (mass=1kg) to fall about 0.1 meter, makes the body to fall at least for 1 meter (down to my floor, i did not verify if it fall under). I must set a value biggest to make the body to oscillates inside the 10cm.

So, is there a relation between the Spring constant KP/Spring Damping KD) and (setStiffness/setDamping functions)?

Thank you