CNA Samples

Waypoint Navigation

Ported from Microsoft's XNA 4.0 Waypoint Navigation sample.

Source for this sample on GitHub ↗

A tank moves between red-to-blue waypoint markers on a blue field, with the current steering behavior shown above. Play ▸

Opens in a new tab. Move the cursor with the arrow keys and press A to place a waypoint.

About this sample

Guide a tank through waypoints in the order you place them. Linear behavior turns straight toward the next point; steering behavior turns and changes speed smoothly.

Controls

ActionKeyboardGamepad
Move the cursorArrow keysLeft thumbstick
Place a waypointAA
Switch movement behaviorBB
Reset the tank and waypointsXX
ExitEscapeBack