This project has moved and is read-only. For the latest updates, please go here.

Trying to rotate a joint manually

Topics: User Forum
Nov 3, 2012 at 12:30 AM
Edited Nov 3, 2012 at 12:31 AM

Hi I am trying to rotate a joint manually 

What I am really trying to do is a 2d bone system that will work together with farseer's collition and I need to be able to tell the joint to rotate/change angle,  in order to animate a human structure or other structur according to a pre edited animation.


Does anyone know how to change a joint angle manually?

Nov 3, 2012 at 11:54 AM

You can use a RevoluteJoint between the bones with limits enabled. To rotate the joint set both lower and upper limit to the relative angle desired. The solver will do the rest.

You can also use a motor on the RevoluteJoint and in each step calculate the motor torque necessary to achive the angle. Allows for finer control but you need some maths.

You can also apply torque/angular impulse manually with or without using revolute joint limits.

One problem with RevoluteJoints is that they are quite soft in my experience. Latest Box2D has a MotorJoint which looks like it is perfect for ragdolls. It should not be hard to port it to Farseer but you must use the latest Farseer svn due to changes of solver parameters being passed around (or wait for the upcoming Farseer 3.5)