Apply torque to ragdoll joints

Hi,



I am trying to implement a proportional-derivative controller for a ragdoll to create physics-based animation. As far as I understand the concept I need to apply torques onto the ragdoll’s joints. These torques act like a spring pulling the ragdoll into the animation / pose I would like to have, allowing to simulate collision and other external forces correctly.



I came across the TestPhysicsHingeJoint class showing motor control. The KinematicRagdollControl uses SixDofJoints and I am unable to find a way to apply motor control here. There are RotationalLimitMotors referenced by every SixDofJoints but I am unable to use their motors. I cannot find any examples on how to use them.



Any help is appreciated, thanks in advance!

joint.getRotationalLimitMotor(index)?

Great, ragdoll starts twitching if I use setTargetVelocity with a higher maxMotorForce. Was confused about it before looking at the native bullet code seeing just references to native methods. JBullet is more helpful here.

I am quite new to (game) physics. Need to read more about constraint-based animation %)

Ya, it all can be a bitch, but you can beat it there :slight_smile: GL and HF :wink:

Thanks for the motivating words :slight_smile: I will figure it out.