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

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.

主站蜘蛛池模板: 扶风县| 民和| 拜泉县| 通海县| 武功县| 西安市| 尼木县| 凭祥市| 高安市| 巩义市| 万年县| 政和县| 胶州市| 城市| 视频| 台东县| 萨迦县| 桐柏县| 容城县| 涪陵区| 肇东市| 崇礼县| 横峰县| 陇川县| 铜鼓县| 宁强县| 道真| 青冈县| 霸州市| 日照市| 玛纳斯县| 万宁市| 平谷区| 顺昌县| 德兴市| 平昌县| 永昌县| 迭部县| 志丹县| 行唐县| 尚义县|