btConeTwistConstraint with friction?

Moose
Posts: 31
Joined: Mon Nov 04, 2013 10:58 am

btConeTwistConstraint with friction?

Post by Moose »

Hello,

On another occasion I have simulated rotation friction on a hinge constraint by using the angular motor with target speed 0. Which works OK. Now my question is, is there a similar trick to emulate friction on a cone twist constraint as well?

I tried the motor but it requires a target rotation and tests have shown that the constraint will always try to reach that target. But what I want is more like real world friction. Like a dynamic object pushes against the constrained object and it moves only slowly... with friction so to speak. But stay in any position once it is reached as long as it is within the constraint range of course.

Thanks,
Moose
Moose
Posts: 31
Joined: Mon Nov 04, 2013 10:58 am

Re: btConeTwistConstraint with friction?

Post by Moose »

A semi-solution here:

It appears to be possible to emulate a ball socket constraint using a generic 6dof constraint. With this, you can activate the 3 angular motors and achieve the desired effect.

The constraint is quite unstable though. Gravity lets the objects slowly fall.
You have to crank up iterations to 1000 though to get it stable.

HTH,
Moose