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

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.

主站蜘蛛池模板: 万安县| 兴海县| 定安县| 鄂尔多斯市| 通州市| 北流市| 开封县| 屯昌县| 垣曲县| 延长县| 隆昌县| 南溪县| 广丰县| 铜陵市| 大城县| 贡觉县| 辉南县| 韩城市| 通城县| 无极县| 桂东县| 玛多县| 屯留县| 宜兴市| 九龙县| 澳门| 余庆县| 宣武区| 北辰区| 西贡区| 桂平市| 丹江口市| 满洲里市| 平昌县| 准格尔旗| 兴海县| 淮北市| 正定县| 田东县| 钟山县| 衡水市|