1
\$\begingroup\$

I want to create a seesaw like in this picture: seesaw

I created two rectangular bodies, one for the diagonal rectangle and one for the little rectangle in the middle. But I don't know how to connect the two bodies. How can I do that?

How can I create a seesaw with Farseer Physics Engine 3.5?

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

Use JointFactory.CreateRevoluteJoint, which creates a RevoluteJoint between two bodies.

Note that, by default, bodies connected by joints do not collide with each other (by default, joints have CollideConnected = false).

The Farseer samples have a few uses of revolute joints, if you search through them (although none of them are a simple seesaw).

\$\endgroup\$
2
  • \$\begingroup\$ Thanx. It worked. But how can I delete a joint from the Farseer world if I don't need the joint anymore? \$\endgroup\$ Commented Jun 14, 2014 at 9:44
  • \$\begingroup\$ World.RemoveJoint \$\endgroup\$ Commented Jun 14, 2014 at 11:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .