XNA Creators Club Online

beginner's guide

3D Lessons

1 Introducing the 3D Tutorial
2 Creating the Game Project
3 Adding Assets
4 Drawing Terrain
5 Drawing a Game Object
6 Making a Missile Launcher
7 Firing Missiles
8 Making Sounds
9 Creating Enemies
10 Destroying Enemies

10. Destroying Enemies

Tie it all together by using BoundingSphere objects to detect collisions between enemies and missiles, giving you the ability to shoot down the enemy UFOs.

Step 1

Watch Video
Create a TestCollision method that compares the BoundingSphere objects around all missiles and enemies to test for collisions. Play sounds and eliminate missiles and ships that collide.
Download source code
var gDomain='m.webtrends.com'; var gDcsId='dcschd84w10000w4lw9hcqmsz_8n3x'; var gTrackEvents=1; var gFpc='WT_FPC'; /*<\/scr"+"ipt>");} /*]]>*/
DCSIMG