You will need to download the following model, or use one of your own:
You can take a look at the final product here.
Create a new project
Open Unity and go to File > New Project.
The New Project file dialog will come up.
Below you will see the packages Unity comes with. A package is a set of scripts and assets that allow certain functionalities. For this demo, we will choose:
Unity will open with an empty scene.
Import the model
1.Check the Generate Colliders box.
The First Person Controller
It’s hard to see if the scale is off without another model for comparison so we’ll also drag and drop the First Person Controller into the scene.
You can find the First Person Controller* (FPC) by locating the Standard Assets folder in the Project panel and looking in the Character Controllers folder. You will see the 3rd Person Controller and the FPC .
NB: If you do not find the FPC, go to Asset > Import Package > Character Controllers and Import All.
Drag the (FPC) into the scene inside the museum model.
FPC is raised off the floor. If the FPC is partially through floor, the camera will fall to infinity. If the FPC is high above the green plane, it will fall until it collides with it.
FPC and model scale
Preview the Model
Point light is an omnidirectional point of light. Directional light imitates sun light from an angle. Spot light is a concentrated area light. To light an entire scene, we will add a directional light.
Click on GameObject > Create Other > Directional Light.
Edit Unity Lighting
You’ll definitely want to block access anywhere the user may fall infinity and break the user experience as in our current museum demo.
Adding invisible collider is very simple. We’ll start by adding a cube to the scene.
1.Go to GameObject > Create Other > Cube
2. Press ‘F” to focus on the cube
A cube appears in the scene view.
Moving the Cube 1
We’ll move the cube to the edge of the green plane. We’ll use vertex snapping for moving objects next to other objects.
Scaling the Cube
Hide the Cube
Now we can duplicate the object (Ctrl D) and reposition the duplicates adjacent to the other edges of the green plane.
Unity provides a number of skyboxes you can use. If you did not import the Skybox package when you created the project, you can import to Assets > Import Packages > Skyboxes, then click the Import button on the popup window.
Now go to Edit > Render Settings and in the inspector you’ll find Skybox Material.
Click on the little circle next to it and you’ll open the Material Browser. Unfortunately, it will show every Material existing in the project and will not cull out those only suitable for Skyboxes. But since Skybox materials usually have “sky” in the name, if you type “sky” in the search bar at the top, the browser will only show those materials suitable for Skyboxes. Unity provides various day and night time skyboxes.
Character Controller Menu
The Character Motor Component
-Expand the Movement hierarchy and you’ll find the Max Forward, Sideways and Backwards Speed, as well as Gravity and Ground Acceleration.
-The most effective strategy for fine tuning is to be in Play Mode and adjust the values. Anytime you adjust a value it will be reflected in the Player. Once you have values that seem appropriate, either take a snapshot of the values or write them down. When you quit Play Mode, the values will reset to their original, and you must enter them in again.
You can also adjust the Jumping or disable it completely. It is unlikely you will need to worry about Moving Platform and Sliding.
To modify the Y Sensitivy, select the FPC in the Hierarchy and expand it. You will find Graphics and Main Camera. Select main Camera and you the inspector will show another Mouse Look component. Adjusting the Sensitivity Y will modify your mouse movements up and down.
These are the basics for a walkable demo in Unity. We will next look at adding a mechanism for gathering information in our walkable demo.
A museum should have artifacts! Download several Hampson artifacts, import them and place them on the pedestals inside the museum structure. You can use them in the next tutorial. Be sure to use a scale factor of .005. Leave the Generate Colliders box unchecked.