6

Player Movement Controllers

This chapter is all about movement. We build the scripts that will determine the way that a player moves and behaves in the physics world. It is entirely focused on movement.

In this chapter, we look at three different movement controllers:

  1. 3D humanoid character It is assumed that this control script will be able to do humanoid things, such as run forwards, backwards and turn around.

  2. Wheeled vehicleThe vehicle controller utilizes Unity’s Wheel Colliders to work toward a realistic physics simulation. There will be no gearing, but the vehicle will be able to accelerate, brake or steer left and right.

  3. 2D Platform PlayerThis 2D platform character controller offers left/right and jump functionality with basic ...

Get C# Game Programming Cookbook for Unity 3D, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.