Chapter     5

Moving the GameObject

You have built a basic scene and populated it with GameObjects. You’ve added scripts to allow user interaction to add and destroy GameObjects, as well as change their appearance. Now it’s time to add movement.

First you’ll learn how to use the GameObject’s Transform component to move the GameObject through a script. Then you’ll get an introduction on how to use Unity’s Mecanim system with more complex GameObject characters from the Asset Store. These come with built-in animations that you will learn to manipulate via your scripts.

The Unity game engine also provides for GameObject movement and interaction in response to forces like gravity or collisions with other GameObjects. These are controlled by Unity ...

Get Learn Unity 3D Programming with UnityScript: Unity's JavaScript for Beginners 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.