An apparatus for generating a magnetic field for tracking of an object (12) can include a localized magnetic field generator (76) that is configured to generate a magnetic field (621) and to control the magnetic field (621) in an area of interest (38) and configured to control the magnetic field (621) in a separate area. The separate area can be displaced from the area of interest (38) and can include a magnetic field-disrupting component (86). The object (12) can be located in the area of interest (38).