Unity Face Tracking
Unity face tracking is an easy way to use head position in your interactive projects.
View Demo (6s vine video)
To use Unity Face Tracking, you need to download and install OpenTrack. This software is used to capture the head via your webcam. This project works with Unity free and pro.
- Install and launch the software
FaceAPIin Tracker Source.
Flight Gearas Game Protocol (use the port 5550, by default)
- Press Start
- Open Unity project
- Run the game. You are done !
How does it works
FaceAPI is a powerfull real time 2D tracker. This software track the head-position in 3D providing X,Y,Z position and orientation coordinates per frame of video. Opentrack allow us to send this via the UDP protocol, on the local server. The head position data is stored in the ram. With unity 3D, the script UDPRecieve read the bytes, and decode it from hexa to float.
c# script is located in the Standard Assets folder, to be compiled before the
- Complete documentation
- Stanisław Halik (Opentrack team) for his help with byte decoding.