Joint Motors
I want to control the torque on a joint directly abd expose the controls with the Motor and Encoder contracts.
It looks like I can only set a JointDrive to be a PD controller on position or velocity.
The Ageia documentation says that joints support motors as well as springs, but I am unable to figure out how to attach motors to joints. I tried accessing it through the NxD6Joint, but access is restricted.
The answer is to implement Update in the simulation entity and call ApplyTorque or ApplyForce to do what you want.
I think you can then add the Motor contract to your simulation entity such that the power level set through the Motor interface controls the values passed into ApplyTorque.
The problem I am having now is either ApplyTorque is not operating as I expect it to or I am getting friction from some unknown source (as I asked in http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1641272&SiteID=1).
One other thing.
If you are working with two moveable entities connected by a joint, be sure to apply equal and opposite force/torque to both entities.
More options for the JointDrive would make it much easier to do that.