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 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.