CNA Samples

Aiming

Ported from Microsoft's XNA 4.0 Aiming sample.

Source for this sample on GitHub ↗

A cat standing in the blue cone of a spotlight against a black background. Play ▸

Opens in a new tab. Move the cat with the arrow keys or hold the left mouse button to guide it.

About this sample

The cat moves around a dark scene while a spotlight turns smoothly to face it. The sample demonstrates trigonometric aiming, a maximum turn speed and additive blending for the beam of light.

Controls

ActionKeyboardMouseGamepad
Move the catArrow keysHold left button at the destinationLeft thumbstick or D-pad
ExitEscape—Back