Time for action – add the Paddle
We'll borrow a term from Pong by naming our hittable surface paddle
. The paddle will be the thing the player uses to bounce the ball and keep it up in the air. We can build the paddle using Unity's built-in Cube primitive, like we did with the Sphere.
In the menu, navigate to GameObject | Create Other | Cube, as shown in the following screenshot:
Now, according to Hierarchy, we have three instances of GameObject in our Scene: the Ball, a Cube, and the Main Camera. Let's rename our Cube to remind us what it will do in the game:
If the Cube is not selected, click on its name in the Hierarchy panel and rename it
Paddle
:Now, we should make the Paddle more paddle-like by changing the Scale properties of the Transform component.
Make sure that the Paddle is still selected in the Hierarchy panel.
In the Inspector panel, change the X Scale value of the Paddle to
1.1
.Change the Y Scale value of the Paddle to
0.04
.Make sure the Position values are zeroed out to move the...