Book Image

Unity 2D Game Development Cookbook

By : Claudio Scolastici
Book Image

Unity 2D Game Development Cookbook

By: Claudio Scolastici

Overview of this book

<p>Unity is a powerful game development engine that provides rich functionalities to create 2D and 3D games.</p> <p>Unity 2D Game Development Cookbook is a practical guide to creating games with Unity. The book aims to serve the purpose of exploring problematic concepts in Unity for 2D game development, offering over 50 recipes that are easy to understand and to implement, thanks to the step-by-step explanations and the custom assets provided. The practical recipes provided in the book show clearly and concisely how to do things right in Unity. By the end of this book, you'll be near "experts" when dealing with Unity. You will also understand how to resolve issues and be able to comfortably offer solutions for 2D game development.</p>
Table of Contents (15 chapters)
Unity 2D Game Development Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Setting the Character Controller


The Character Controller is designed for the first- and third-person control systems. It comes with movement control in all four directions, jump controls, and independent control of the camera, so the player can run in one direction and shoot in another.

A pretty clear way to describe the Character Controller is by saying that it is very precise with regard to movement, though it lacks fluidity: the character accelerates to maximum speed in the blink of an eye, turns on a dime, and stops the very moment you release the button. In other words, the feeling you get using a Character Controller is not very realistic, and to make it more fluid so it looks realistic, you need to turn to coding.

The Character Controller also doesn't implement physics by itself. It detects collisions but doesn't push or apply forces to the other GameObjects in the scene unless you program it to do so. As a matter of fact, it wouldn't even be affected by gravity if the scripts attached...