Advanced practical course: Optical headtracking with a Wiimote: The Wiiheadtrack-class

Daniel Wunderlich (
Christian Rohrbeck (



This document is about the advanced practical course optical headtracking with a Wiimote at the Visualization and Numerical Geometry Group of the Heidelberg University by Christian Rohrbeck and Daniel Wunderlich. The task was to implement a headtracking interface in C++ using a Nintendo Wii Remote and glasses with attached infrared LEDs. It was inspired by the impressing video of Johnny Chung Lee (where also the function of headtracking is explained), but with the focus on Linux and OpenGL support.


You can download Wiiheadtrack at here.


The Nintendo Wii is a game console, which is primary controlled with a Wii Remote ("Wiimote").


This wireless controller comes with a infrared ("IR") detecting "camera" which allows the Wii locate the user's position in front of the TV/monitor with the help of a sensor bar featuring IR-LEDs. The Wiimote communicates with the Wii via Bluetooth, why it's possible to connect the Wiimote with a computer using a Bluetooth-device. The wiiuse library, written in C by Michael Laforest, allows to use the Wiimote with most of its functions in C/C++ programs.


For running the Wiimote in combination with wiiuse as a headtracking-system, the Wiimote is used as a fixed camera which captures the user in front of the monitor. We constructed a stand of K'NEX:


The user needs to attach two IR-LEDs at its head ("eyes"). We used existing, selfmade glasses with integrated IR-LEDs:



Wiiheadtrack -- that's the name of our class -- is especially written for the usage with OpenGL under Linux, but it should also compile under Windows and with other graphic libraries supporting C++ (we've not tested that). Due to wiiuse doesn't support Apple-systems so far, Wiiheadtrack doesn't, too. You also need:

As explained above, the connection to the Wiimote is realized via wiiuse, which exists in a subfolder of Wiiheadtrack.

About this documentation

This documentation contains:

We recommend to read these information (in the order above) before using Wiiheadtrack!


We would like to thank...

 All Data Structures Files Functions Variables Enumerations Enumerator