Chapter     5

Let’s Dance! Animation and Sound

Of the three ways to move GameObjects in Unity, scripted control of the Transform Component was covered in the previous chapter, and physics will play a significant role in the bowling game example initiated in the next chapter. Scripted movement is ubiquitous. For example, even in the upcoming bowling game, which relies heavily on physics to control and simulate the bowling ball and its collision with the floor and bowling pins, the Camera following behavior is implemented by a script that modifies its Transform Component (much like the MouseOrbit script used in the cube scene). Not only that, every moving GameObject is reset between rolls and frames by restoring the values in its Transform Component. ...

Get Learn Unity 4 for iOS Game Development 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.