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

RevoluteJoint Help

Topics: User Forum
Sep 13, 2010 at 8:47 PM

In the previous builds of Farseer Physics 3 (before an official release), RevoluteJoint constructors looked like this:

            RevoluteJoint revJoint = new RevoluteJoint(mainBody, circleBody, Vector2.Zero);

So it made the center position of circleBody the point of rotation. How do I do this with the new constructor? 

Sep 14, 2010 at 12:25 AM

Take a look at the RevoluteTest inside the Testbed. You use the GetLocalPoint() of the first body and give the second body as an argument. Then you can give Vector2.Zero as the second anchor. The JointFactory.CreateRevoluteJoint() does this for you (it mimics the behavior of the old constructor).