Dexter Industries have come out with another sensor for the NXT, this time a compass.
This particular one can measure along 3 axis (so I guess that means heading as well as tilt?)
As with all compass sensors, you need to be very careful around other magnetic fields (power cables, motors etc) but according to the manual, you can do some calibration to reduce any offset from true north.
At $29, it's one of the cheaper sensors available for the NXT :)
More details including code samples for NXT-G, RobotC and Labview can be found here.
(via Bot Bench)