Hugo Peixoto
16-03-2008 18:11:55
Hey there, I'm trying to implement a hinge joint motor.
Currently, I have set a custom callback for a normal Hinge,
which calculates an acceleration and calls setCallbackAccel
on the joint.
Unfortunately, the way I'm calculating the acceleration isn't
very realistic:
where angle is the angle I want to move to.
I wanted something more like "add a torque of X to the joint",
so that it would have in account all the forces being applied to both
bodies, in the simulation. (in order to avoid an unlimited strength joint)
What is the correct way of doing this?
Best regards,
Hugo Peixoto.
Currently, I have set a custom callback for a normal Hinge,
which calculates an acceleration and calls setCallbackAccel
on the joint.
Unfortunately, the way I'm calculating the acceleration isn't
very realistic:
Real accel = joint->calculateStopAlpha(Radian(Degree(angle)));
where angle is the angle I want to move to.
I wanted something more like "add a torque of X to the joint",
so that it would have in account all the forces being applied to both
bodies, in the simulation. (in order to avoid an unlimited strength joint)
What is the correct way of doing this?
Best regards,
Hugo Peixoto.