Moving objects around without a spring?

Mar 24, 2010 at 4:03 PM
I love the feature that lets me pick up objects, such as ragdolls, by the parts and move them around. I was wondering what the best way to make it so that there is no spring involved? I tried just increasing the spring coefficient, but that resulted in a shaky behavior. Any thoughts? Brian
Coordinator
Mar 24, 2010 at 4:44 PM

Farseer doesn't behave too well when you arbitrarily move physics objects around. You can often see tunneling (objects passing through each other and getting stuck). The spring works well to move things around because the engine is still responsible for determining position at a point in time. This behavior might improve with Farseer Version 3, you can read more details on that at http://farseerphysics.codeplex.com.

But if you absolutely want to try it, you can change the Position property of the BodyObject in code.

_physicsController.PhysicsObjects["ball"].BodyObject.Position = new Vector2(x, y);

Jun 4, 2010 at 10:49 PM

I have created a behavior that moves objects without springs. You can see the code in this thread: http://physicshelper.codeplex.com/Thread/View.aspx?ThreadId=206810