[ODE] Restoring Force
Hendrix_ at gmx.net
Wed Jul 11 13:18:33 MST 2007
I see it is already implemented in universal joint:
bool constraint1 = j->limot1.fmax > 0;
bool constraint2 = j->limot2.fmax > 0;
So all you need to do is
dJointSetUniversalParam(joint, dParamLoStop, 0 );
dJointSetUniversalParam(joint, dParamHiStop, 0 );
dJointSetUniversalParam(joint, dParamFMax, maxforce);
Does it work? "maxforce" refers to the maximum correcting force as I
understand it. Set it to a high value.
On 11.07.2007, at 18:41, Tobias Zimmer wrote:
> The Limitation of the angles should work, but the forces seem to
> bend these limits!
> The maxforce may be a way...
> May I send you my small example brush code that you would see it in
> Perhaps you would get an idea then. I'm a bit desperate about the
> force, everything else seems to work the way I want it to.
> Am 10.07.2007 um 00:31 schrieb Patrick Enoch:
>> I think you can add a rotation-limot with histop=lostop=0 and
>> maxforce=f. That should do all the work for you. You need to check
>> the joint.cpp.
>> I dont know if the universal joint suports limiting the agnles, but
>> you can easily duplicate the joint-type and make up a new joint that
>> adds those 2 limots.
>> Or enhance the universal joint.
More information about the ODE