CNA Samples

Heightmap Collision

Ported from Microsoft's XNA 4.0 Heightmap Collision Sample.

Source for this sample on GitHub ↗

A golden sphere rolling across a textured rocky heightmap beneath a dark sky. Play ▸

Opens in a new tab.

About this sample

Roll a sphere over a rocky terrain generated from a heightmap. The sphere follows the terrain's height, while a chase camera turns with it and stays above the ground.

Controls

ActionKeyboard
Roll forward or backwardW / S or Up / Down
Turn left or rightA / D or Left / Right
ExitEscape