Demonstrates a good way to display a crosshair. When running the application, drag with the right mouse button to center the crosshair on a vehicle, and then hit "enter" to select the vehicle. The vehicle can then be driven with the WASD keys.

A crosshair can be created simply by parenting a properly located billboard to the camera. One problem with this approach is that the crosshair can disappear behind the scene geometry. This code avoids this problem entirely by creating a seperate scene and camera for the crosshair alone, and rendering the crosshair on top of (i.e. after) the main scene. Note that the automatic clearing behavior of the renderer must be turned off for this to work via: renderer.autoClearColor = false;

example 40: crosshairs