官术网_书友最值得收藏!

Time for action – Adding physics to your game

Let's tap into Unity's built-in physics engine by adding a Rigidbody component to the Ball.

  1. Select the Ball in the Hierarchy panel.
  2. In the menu, choose Component | Physics | Rigidbody.
  3. A Rigidbody component is added to the Ball. You can see it in the list of the components of the Ball Game Object in the Inspector panel.
  4. Make sure that the Rigidbody component's Use Gravity checkbox is checked in the Inspector panel.
  5. Click on Play to test your game.
  6. Click on Play again when you've recovered from how awesome that was.

No way! When you tested your game, you should have seen your Ball plummet straight down and land on the Paddle. How cool was that? If you answered "especially cool", give yourself ten points.

主站蜘蛛池模板: 梧州市| 类乌齐县| 将乐县| 潮州市| 平舆县| 望谟县| 克山县| 松滋市| 洪泽县| 长顺县| 湖北省| 海晏县| 呼和浩特市| 芦溪县| 余庆县| 巨野县| 武威市| 佛教| 隆化县| 东乌珠穆沁旗| 祁门县| 彭州市| 类乌齐县| 华亭县| 浪卡子县| 和静县| 容城县| 屏东县| 洛扎县| 宝清县| 乌海市| 都兰县| 大英县| 兰考县| 通辽市| 吐鲁番市| 潞城市| 岳池县| 新乡县| 临江市| 满洲里市|