the "sensor" is actually in the remote. The bar is just two infrared leds seperated by a known distance, that the infrared camera in the remote uses to figure out it's position.
I play a bit of flightsim and our head tracking works the same way. Camera receives IR LED position for head movement axis, program does the interpretation of movement.
There's a homebrew head tracking demo [0] for the wii that has you put a sensor bar on your head, and a wiimote on top of your TV. I messed around with it over a decade ago and found it very convincing.