I'm currently working on a side-scroller and had been using my own mass-and-spring based ragdoll system until I decided to incoporate Farseer instead.
So far it's great, but I'm having some trouble keeping my ragdoll character together. I'm using a worldReference Vector2 variable to control the 'camera' in the game and when my ragdoll is created I'd like the camera to follow it as it falls through the
level. The solution I've come up for with Farseer is this:
game.worldRef -= HeadBody.Position - prevPosition;
HeadBody.Position = prevHeadPosition;
After each update, the difference in the head position (my root in the ragdoll) is subtracted from the worldRef, and then the head is moved back to its default position at center screen. This lets me take any forces applied to the head body and apply them
to to the camera, which results in the camera following the ragdoll.
The problem is that while the head will stay centered, the other pieces of the ragdoll will not stay firmly attached to the head. They will eventually return to their attached position when the head stops moving, but at any kind of speed they look like they're
being pulled apart.
Does anyone know if this is due to the joints themselves or is it some naive coding mistake on my part?