O'Reilly logo

C# Game Programming Cookbook for Unity 3D by Jeff W. Murray

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

Chapter 5

Building Player Movement Controllers

As discussed in Chapter 3, what we called a player controller is focused on movement; it is the script that determines the way that a player moves and behaves in the physics world. It is entirely focused on movement—making a ship fly, a human move along the ground, or a car to drive.

The example games call for three different vehicle types:

  1. Shoot ’em up spaceship—A spaceship that moves up, down, left, and right. Its movement need not be physics based.
  2. Humanoid character—This control script is capable of general human things, such as running forward, backward, and turning around.
  3. Wheeled vehicle—The vehicle controller utilizes Unity’s wheel colliders to work toward a more realistic physics simulation. ...

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