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
\$\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\$
  • \$\begingroup\$ Thanx. It worked. But how can I delete a joint from the Farseer world if I don't need the joint anymore? \$\endgroup\$ – Homer_Simpson Jun 14 '14 at 9:44
  • \$\begingroup\$ World.RemoveJoint \$\endgroup\$ – Andrew Russell Jun 14 '14 at 11:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.