CNA Samples

Chase Camera

Ported from Microsoft's XNA 4.0 Chase Camera sample.

Source for this sample on GitHub ↗

An orange spaceship viewed from behind above a blue checkerboard ground, with the game's control instructions at left. Play ▸

Opens in a new tab.

About this sample

Fly a Spacewar ship above a checkerboard plane. A spring and damper let the chase camera lag behind movement and settle back into place. Toggle the spring to compare it with a rigid camera at a fixed offset from the ship.

Controls

ActionControl
ThrustSpace, right gamepad trigger or left mouse button
SteerArrow keys, left gamepad stick or press a screen edge
Toggle camera springA, gamepad A or click the top-left corner
Reset the shipR or right gamepad stick click
ExitEscape or gamepad Back