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

Time for action – Creating the ball

Add a built-in GameObject to the Scene.

  1. In the menu, click on GameObject.
  2. Point to Create Other and then click on Sphere.

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 four 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 Colliders touch, overlap, or stop touching.
  • 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.

主站蜘蛛池模板: 洪雅县| 龙南县| 东丽区| 西吉县| 宜春市| 顺义区| 海门市| 聂荣县| 太湖县| 石阡县| 新竹市| 乌兰浩特市| 剑川县| 海原县| 多伦县| 阳信县| 石屏县| 大荔县| 尼勒克县| 博罗县| 色达县| 金坛市| 秭归县| 津市市| 乐昌市| 确山县| 东明县| 福鼎市| 民县| 北票市| 清苑县| 东乡族自治县| 清徐县| 东乡族自治县| 西青区| 常德市| 钦州市| 湘潭县| 宿州市| 廊坊市| 博爱县|