Keeping yourself in the dark

If you've kept an eye on the Game view, which is what the player sees, you've noticed that the Mesh game objects in our Scene are a dark, dreary gray color. Would you believe me if I told you they're actually closer to white?

Just like on a real movie or teevee set, 3D scenes require lights to illuminate objects. The lights aren't actually "real" objects (such as our Ball and Paddle meshes), they're virtual objects in 3D space that determine whether the faces on a mesh will appear bright or dark. The computer figures this out for us based on the kind of light we use, the way we position and rotate it, and the settings we give it.

So, while you can move a light around your scene just like the Ball or the Paddle, there's ...

Get Unity 4.x Game Development by Example Beginner's Guide 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.