Some time back i tried the hole Augmented Reality thing and now that Pokemon Go is so popular
I remembered this project that i did below is a video showing a demo of the project that i did:
If you enable your Webcam in this flash app you can try it your self.
The X-wing will rotated on the Code and if you move it it will follow your movement.
This code is used to display the xwing print it out or display it on your tablet or phone
Place it so the webcam can see the code