private bool IsNavigable(Vector3 pos) { foreach (Entity entity in XNAGame.Instance.Children) { if (entity is Obstacle) { Obstacle obstacle = (Obstacle)entity; if (obstacle.isInside(pos, 2.0f)) { return(false); } } } return(true); }