3D Radar Sample, C#, XNA 2.0 - 05/24/2008 |
3D Radar Sample
Click Here To Download
This sample shows how to easily integrate a 3D Radar using 2D HUD into your 3D game. Most of this sample's code is simply creating the 3D environment, the Radar component itself is fairly simple and small.
Note: I did not create the 3D environment myself, this sample was built upon the Collision with Heightmap and Normals Sample created by Microsoft's XNA Team. Here is the link to the original sample.
Features I've added to the original:
- Customizable 3D Radar HUD lets you choose where to place the HUD, how big to make it, the range of the Radar and more.
- Radar blips scale, they are larger when the enemy is higher in elevation than the player, and are smaller when the enemy is lower.
- Random movement and position of "enemies".
Extras:
- Performance optimizations double the framerate when trying to draw many enemies. Shows how to check if objects are even in view before attempting to draw them, without doing a bounding frustum check. Works great in this sample, but is limited, comments in code explain in more detail.