How can I create rectangles in Farseer that behave like the two red rectangles in this video:
https://www.youtube.com/watch?v=w0p2y4dRylQ
I created an angle joint, but it behaves weird. Should I use an angle joint or is it better to use another joint?
In addition, I don't know how to adjust the angle of the joint so that the rectangle only moves in a predefined angle. How can I limit the movement angle of a joint?
I tried it like this, but the rectangle moves not as it should:
RectangleA1 = BodyFactory.CreateRectangle(world, 3.50f, 0.50f, 1.0f);
RectangleA1.BodyType = BodyType.Dynamic;
RectangleA1.Position = new Vector2(10.4f, 5.40f);
RectangleA1.Rotation = 0f;
RectangleA1.CollisionCategories = Category.Cat5;
RectangleA2 = BodyFactory.CreateRectangle(world, 0.10f, 1.00f, 1.0f);
RectangleA2.BodyType = BodyType.Static;
RectangleA2.Position = new Vector2(8.6f, 6.2f);
RectangleA2.Rotation = 0f;
RectangleA2.CollisionCategories = Category.Cat5;
AngleJoint1 = JointFactory.CreateAngleJoint(world, RectangleA1, RectangleA2);
spriteBatch.Draw(RectangleA1Sprite, ConvertUnits.ToDisplayUnits(RectangleA1.Position), null, Color.White, RectangleA1.Rotation, new Vector2(RectangleA1Sprite.Width / 2.0f, RectangleA1Sprite.Height / 2.0f), 1f, SpriteEffects.None, 0f);
spriteBatch.Draw(RectangleA2Sprite, ConvertUnits.ToDisplayUnits(RectangleA2.Position), null, Color.White, RectangleA2.Rotation, new Vector2(RectangleA2Sprite.Width / 2.0f, RectangleA2Sprite.Height / 2.0f), 1f, SpriteEffects.None, 0f);