CNA Samples

Shatter Effect

Ported from Microsoft's XNA 4.0 Shatter Effect sample.

Source for this sample on GitHub ↗

A textured tank breaking into thousands of small rotating triangles above two lines of controls. Play ▸

Opens in a new tab.

About this sample

A custom content processor separates every triangle in the tank model and gives each one a center and a random rotation velocity. The original compiled vertex effect rotates the triangles independently, pushes them outward, and drops them as time advances. Hold the reverse control to bring the model back together.

Controls

ActionKeyboardGamepad
Shatter the modelHold UpHold A
Reverse the effectHold DownHold B
ExitEscapeBack