+ * - Fixing path placement in Farseer

* Fixing rectangle placement in Farseer
+ * - Moving base.draw to last in AxiosGameScreen to make sure Farseer debug information is visible
This commit is contained in:
Nathan Adams
2012-05-13 22:20:50 -05:00
parent f57659e2e1
commit 33d46b0cd7
4 changed files with 10 additions and 8 deletions

View File

@@ -30,8 +30,8 @@ namespace Axios.Engine.Gleed2D
{
base.load(cm, world, ref cache);
Vertices v = new Vertices(WorldPoints.Length);
foreach (Vector2 vec in WorldPoints)
Vertices v = new Vertices(LocalPoints.Length);
foreach (Vector2 vec in LocalPoints)
v.Add(new Vector2(ConvertUnits.ToSimUnits(vec.X), ConvertUnits.ToSimUnits(vec.Y)));
_body = BodyFactory.CreateLoopShape(world, v);

View File

@@ -28,8 +28,8 @@ namespace Axios.Engine.Gleed2D
{
base.load(cm, world, ref cache);
_body = BodyFactory.CreateRectangle(world, Width, Height, 1f);
_body.Position = ConvertUnits.ToSimUnits(Position);
_body = BodyFactory.CreateRectangle(world, ConvertUnits.ToSimUnits(Width), ConvertUnits.ToSimUnits(Height), 1f);
_body.Position = ConvertUnits.ToSimUnits(Position) + new Vector2(ConvertUnits.ToSimUnits(Width)/2, ConvertUnits.ToSimUnits(Height)/2);
_body.UserData = this;
}
}