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

Time for action - create the ball

  1. Add a built-in GameObject to the Scene.
  2. In the menu, click on GameObject.
  3. Point to Create Other.
  4. Click on Sphere.
Time for action - create the ball

What just happened that's all there is to it?

Well, yeah, actually! Unity has a number of prebuilt simple 3D models, also known as primitives, which we can use to get started. You've just created a built-in Game object with three components on it. Look at the Inspector panel to see what those components are:

  • Transform: This determines how a Game Object is positioned, rotated, and scaled (made big or small) in your Scene.
  • Mesh Filter: This component takes a mesh, which is the stuff our Game Object is made from, and runs it through the Mesh Renderer.
  • Sphere Collider: This is a sphere-shaped boundary on our Game Object that helps Unity figure out when instances of Game Object touch or overlap.
  • Mesh Renderer: This component enables the player to see our meshes. Without it, meshes don't get drawn or rendered to the screen.

We'll get a better understanding of what exactly a Mesh is when we add the Paddle to the Scene a few steps from now.

主站蜘蛛池模板: 抚顺县| 莱州市| 新干县| 泸水县| 苍溪县| 邵阳县| 凌海市| 上林县| 来安县| 城市| 柘城县| 三明市| 鄂托克前旗| 冀州市| 扶绥县| 东宁县| 紫金县| 祁连县| 武夷山市| 武乡县| 安顺市| 昭平县| 理塘县| 哈密市| 绥棱县| 阿尔山市| 鄢陵县| 安龙县| 永寿县| 宜兰县| 桃园县| 金昌市| 澄江县| 九龙坡区| 宁乡县| 封开县| 余姚市| 厦门市| 通榆县| 青铜峡市| 梓潼县|