1. First, create a new project.
Add a plane (planar) under create under the 2.hierarchy (layer) Form
3. Adjust the visual angle of the main camera so that the panel appears in the game form. This step is more difficult, if there is no 3-dimensional modeling basis, it is not good to complete. But it's okay, don't forget we have shortcut keys.
Adjust the panel's view in the Scence (scene), usually the x-axis on the right. Then select Main camera, press and hold ctrl+shift+f, and you will find that the camera is automatically positioned.
4. Import the System Resource pack
Under Project->assets folder, right-->importpackage->character Controller and import all
The character controller in the assets folder will have a picture of the plumber inside, and drag it into the plane to adjust the viewing angle.
5 Hierarchy (layer) under Create, add a cube cube to the plane
6. Add a light under create under the Hierarchy (layers) Form and place it on the plane
The following are preliminary:
7.u3d light is divided into directional direction light, Point light, Spot Spotlight, Area region light specific properties, the use of the next article will be excerpt a detailed.
8. Add Shadow (no shadow beneath the light is a wonderful thing)
Note the place where the red box is drawn, area light is just the name of the light that we added, and now, is it a region? The answer is not that he is directional direction light. Why is it? Because his type is set up. So, sometimes don't be confused by the name. To let the light object have a shadow, but also to set the properties of the light shadow properties of the soft Shadows or hard Shadows.
Shadow is divided into hard shadows and soft shadows Two kinds, the former one is heavier, the latter is relatively soft. But by default, you will find that as long as directional light type of lights can use the shadow, don't worry, let's change a setting, so that the other two lights can also use the shadow, open Edit-project Settings-player, Then change the rendering path to deferredlighting (delayed illumination), and your light source and spotlight can also be shaded ~ (to create a shadow, you also need to check the cast shadows (cast Shadow) of the object that casts the shadow, Check the receive Shadows (Accept shadow) of the object receiving the shadow, <ignore_js_op> for example, if you want the tree to have a shadow on the ground, you have to cast shadows on the tree, Then let the ground accept the shadow.)
9. Object Collision:
The cube we added previously was present as an obstacle. A plumber can't pass through it. We need to set the subordinate sex.
When Boxcollider is enabled, the object can exist as an obstacle, i.e. the plumber cannot pass through the cube. When not enabled, the plumber can run into him.
When the Mesh Renderer is selected, the object is rendered in the game interface. Do not render in the game interface without selecting it. Note that it does not conflict with the Boxcollider property. In other words, when an object is selected, the Boxcollider is not displayed on the game screen when the mesh Renderer is selected. However, when you go to his left side, there will still be a blocking effect.
Therefore, this property can handle map boundary problems. Block the game the little ones run outside the map.
Zero-Starting Unity3d game development "2 Simple Plumber Example"