what am i doing wrong?

Topics: User Forum
Jan 9, 2012 at 9:34 PM

well, what am i doing wrong?
Screenshot

Body b, r, u, d, l;
Fixture fb, fl, fr, fu, fd;
World wo = new World(new Vector2(0f, 20f));


//blablabla mr. freeman
b = new Body(wo);
b.Position = new Vector2(200, 200);
b.BodyType = BodyType.Dynamic;
fb = FixtureFactory.AttachRectangle(64, 64, 1, Vector2.Zero, b);
l = new Body(wo);
l.Position = Vector2.Zero;
l.BodyType = BodyType.Static;
fl = FixtureFactory.AttachRectangle(20, 400, 1, Vector2.Zero, l);
r = new Body(wo);
r.Position = new Vector2(380, 0);
r.BodyType = BodyType.Static;
fr = FixtureFactory.AttachRectangle(20, 400, 1, Vector2.Zero, r);
u = new Body(wo);
u.Position = new Vector2(20, 0);
u.BodyType = BodyType.Static;
fu = FixtureFactory.AttachRectangle(360, 20, 1, Vector2.Zero, u);
d = new Body(wo);
d.Position = new Vector2(20, 380);
d.BodyType = BodyType.Static;
fd = FixtureFactory.AttachRectangle(360, 20, 1, Vector2.Zero, d);


// and in update:
wo.Step(1f);