Movement, Camera Controls, and Collisions

One of the first things players do when starting a new game is familiarize themselves with character movement and camera controls. Not only is this exciting, but it also lets your players know what kind of gameplay they can expect. Hero Born's character will be a capsule primitive that can be moved and rotated using the W,A, S, D, or arrow keys.

We'll start by learning how to manipulate an object's Transform component and then replicate the same control scheme using applied force, which produces a more realistic movement effect. When we move the player, the camera will follow along from a position slightly behind and above, making aiming easier when we implement the shooting mechanic. Finally, we'll ...

Get Learning C# by Developing Games with Unity 2019 - Fourth 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.