O'Reilly logo

Microsoft XNA 4.0 Game Development Cookbook by Luke Drumm

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Implementing simple plane controls

As with the previous recipe for car physics, this recipe is all about enough simulation to make the player feel involved (and hopefully enjoy themselves), but not so much as to either trip the player up in unnecessary detail or slow the game down to a crawl under the possibly heavy weight of a more rigorous simulation.

There is no stalling, wind shear, or trim adjustments here. Just the player turning left, right, up, or down, and powering towards fun.

Getting ready

This recipe relies upon the GeometricBuffer classes covered in Chapter 3, Procedural Modeling, to construct the plane, but any method of creating or supplying a 3D mesh should be sufficient.

How to do it...

To begin flying your own plane:

  1. Begin a new ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required