private void CreatePhysics(Midgard midgard, Entity entity, bool usePos = true)
{
var comp = midgard.CreateComponent(entity,
new BodyDefinition()
{
Position = usePos ? new Farseer.Framework.Vector2(18f + (float)rnd.Next(0, 4), 17f + (float)rnd.Next(0, 3)) :
new Farseer.Framework.Vector2(0, 0)
});
Vertices rectangleVertices = PolygonTools.CreateRectangle(0.5f, 0.2f,
new Farseer.Framework.Vector2(0f, 0.4f), 0f);
PolygonShape shape = new PolygonShape(rectangleVertices, 10000f);
var fix = comp.Body.CreateFixture(shape);
comp.Body.FixedRotation = true;
comp.Body.Mass = 1000f;
comp.Body.Restitution = 1f;
comp.Body.CollisionCategories = FarseerPhysics.Dynamics.Category.Cat2;
comp.Body.CollidesWith = FarseerPhysics.Dynamics.Category.Cat1;
}