O'Reilly logo

Learn Unity 3D Programming with UnityScript: Unity's JavaScript for Beginners by Janine Suvak

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     6

Starting with Coding Physics

Working with game physics is fun, and Unity’s physics engines make it super easy. Physics defines physical properties of how objects interact with each other or in response to external forces. Unity’s powerful physics engines allow you to assign physical properties to your game objects for consistent, realistic gameplay. There are two physics engines, one for 2D and another for 3D. Though they are implemented with different components such as Box Collider 2D and Box Collider 3D, they work much the same way. In this chapter, you will create a simple game to learn how to set up the physical properties of 3D game objects, then add scripting for more complex, interactive behavior.

Rigidbodies

A game object ...

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