Unity3d Learning Note Nine adding details to a scene (ii)

Source: Internet
Author: User

     The previous section adds the first piece of stone with a collider to the scene, and we'll use prefab to add the details of the scene and make it more perfect.        this series of tutorials and footage is based on the translation tutorial "Unity Game Engine Basics Video Tutorial" from the Everyone's material translation group, which is attached to the second study note.
continue to come to the shape of the stone--boulder next to, we can make a lot of stone prefab, so for the enrichment of our huge scene is very advantageous, we first create the first stone prefab press control+d copy a stone, hold down the axis dragged out, Press R to adjust to the zoom tool, and press and hold the center of the White Cube to narrow down the stone.

because the Unity3d in the center of the White Cube is scaled evenly, so at this time the stone should be dangling, so press W to cut back the coordinate tool, adjust his position. Let him and the original stone have a certain degree of overlap. At the same time I scaled him on the y-axis, making him look a little bit shorter, rather than a small copy of the stone next to it. Next, copy a stone, as far as copying which random can, and then tune into a smaller, let three of stones to produce stacking effect, become a stone heap.


Next we will integrate this heap into a prefab, now prefab folder under a new prefab, named Pfb_boulder_cluster. Then create a new game object in the hierarchy, also named Pfb_boulder_cluster, drag three blocks into the new game object, and then drag the game object into the new prefab to complete. Later in the scene as long as you want to add stone heap, you can directly use this prefab. when you want to synchronize the minor adjustments made to one prefab of the scene to all of this prefab, and the prefab introduced later also has this change, just click Apply in the Inspector View, But careful change will break the original scene harmony.       as shown in the two figure below, at the corner, I introduced a prefab and rotated the angle to adjust the proportions, but I didn't apply apply because all the prefab will be rotated smaller after the application.

then drag into the mesh model boulder_01 we introduced earlier, and find the material that belongs to him in materials. Similarly, add mesh Collider, resize, scale, and angle.


Finally, beam is introduced into the scene and affixed to the beam material. Because his shape is regular, add box Collider to it. Unity automatically wraps us up with the right size collider, and we want the beam to be used as a support for the scene, so press E to rotate it 90 degrees with the rotate tool so that he stands up, the wood is much longer than the entire space, and can be adjusted with the R zoom tool.



Next is to put we have collider boulder_01 and beam all made into prefab, I believe we have prefab for building pro. With stone heaps, stone blocks, and wooden beams, we can enrich our scene in great extent.

Here's what we want you to do to decorate our own creation of scenes, wood, stones, and put them in a reasonably good location, complete scenes, and make our scene look more complete.


2015.3.8 19:42by Mr.losers




Unity3d Learning Note Nine adding details to a scene (ii)

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.