diff --git a/Shared/NPC.cs b/Shared/NPC.cs index 216eb46..064d463 100644 --- a/Shared/NPC.cs +++ b/Shared/NPC.cs @@ -26,8 +26,9 @@ namespace SemiColinGames { public string Update(NPC npc, float modelTime, World world) { int moveSpeed = 120; int desiredX = npc.Position.X + (int) (moveSpeed * npc.Facing * modelTime); + int testPoint = desiredX + 12 * npc.Facing; // TODO: define the box modularly & correctly. - AABB npcBox = new AABB(new Vector2(desiredX, npc.Position.Y), new Vector2(1, 33)); + AABB npcBox = new AABB(new Vector2(testPoint, npc.Position.Y), new Vector2(1, 33)); Debug.AddRect(npcBox, Color.Cyan); bool foundBox = false; foreach (AABB box in world.CollisionTargets) {