Unity3d game engine: Building a simple game world (III)

Source: Internet
Author: User
Unity3d game engine: Building a simple game world



If the original Yusong Momo article is reprinted, please note: Reprinted to my independent domain name blog Yusong Momo program Research Institute, Original address: http://www.xuanyusong.com/archives/473



Create game ground

Create a new game project named firstgame. If the default main camera is displayed in the scenario view, add a game ground, as shown in, in fact, unity3d has a concept of terrain. terrain can create a game terrain and introduce it later. Today, we primarily aim to build a simple game world.








Create texture maps

Place the images to be displayed in the project. For more information about drag and drop methods, see the previous chapter. Click material to create a texture map and name it image0-> the information box on the right of the arrow appears. The default rendering mode and location offset are used here, click the color box on the right and the texture2d texture selection box to edit the color and texture content of the texture.







Here is the image dragged into the project. Select an image as the image0 texture. By default, a gradient default-Parti can be selected.






Click the color edit box to add or modify the color of the image, as shown in.





Click gameobject-> createother to create a simple built-in model for the game world 3D system.



Capsule: capsule body Cube: Cube Cyinder: cyder Main camera: main camera Plane: a plane Point Light: Light Source Sphere: Circle Spotlight: camera light source

As shown in: drag and drop the texture to the object to be displayed, and the four buttons in the upper left corner are displayed from left to right. 1: Move the entire view with the mouse 2. Move the coordinates of an object in the three-dimensional Coordinate System 3. Rotation of an object 4. Object Amplification

By default, the 3D coordinate system is a 45-degree angle, which is neither sensory nor conceptual in the plane. It is impossible to determine the drag-and-drop position in a timely manner. Here it is worth mentioning that persp in the upper right corner of the scene view, you can see that there are three cones in the x y z direction. After you click it, the view only displays the plane view in the selected direction. You can drag the object to the position, click the small box in the middle and return to the default 45 degrees.






Click component-> physics-> Rigidbody to bind a gravity sensor collision to multiple objects. I raise the Y coordinate of the box to the ground to see how the Box falls freely.







After talking about it, click the run button to view the game running result. For details about how to compile the SDK on iOS devices, see Chapter 1 of the Unity game engine ~~~



The box begins to fall



The box is falling







How is it? Good, the physical engine is also very good. No wonder the Fairy sword online also chooses to use the unity3d game engine. Let's talk about the old saying that you are welcome to discuss with Momo about game development ~~~





Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.