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

6. Making a Missile Launcher

Take input from an Xbox 360 controller or keyboard, and clamp it to acceptable values, to make your missile launcher turn and take aim.

Step 1

Watch Video
Create the top half of your missile launcher with a new GameObject.

Step 2

Watch Video
Modify the Update call to take controller or keyboard input, and translate that input into rotation values for your missile launcher.
More Details

Step 3

Watch Video
Use the new DrawGameObject method to draw your missile launcher at the proper location and rotation, in just one line.
Download source code
var gDomain='m.webtrends.com'; var gDcsId='dcschd84w10000w4lw9hcqmsz_8n3x'; var gTrackEvents=1; var gFpc='WT_FPC'; /*<\/scr"+"ipt>");} /*]]>*/
DCSIMG