Unity Virtual Reality Projects
上QQ阅读APP看书,第一时间看更新

Measuring the Ethan character

How big is an avatar? Unity comes with a third-person character named Ethan. Let's add him to our scene. He's one of the Standard Assets in the Characters package. So, you may need to import that into your project.

To import, perform the following steps:

  1. Select Assets in the main menu bar and then navigate to Import Package | Characters.
  2. The Import dialog box pops up, containing a list of all the things that can get imported. Click All and then Import. The ThirdPersonController is a prefab (pre-built asset) located in the Project panel. This can be found by navigating to the Assets/Standard Assets/Characters/ThirdPersonCharacter/Prefabs folder.
  3. Drag a copy of ThirdPersonController into your scene. The exact x and z positions don't matter, but set y to 0 so that the character named Ethan is standing on GroundPlane. I left mine at (2.2, 0, 0.75).

Let's try it out:

  1. Click on the Play icon at the top of the Unity window in the center, to start your game. Use the W, A, S, and D keys to move him around. Run, Ethan! Run!
  2. Click on the Play icon again to stop the game and return to edit mode.

So, how big is Ethan? According to Google search, the average height of a human male is 5 foot 6 inches, or 1.68 meters (in the USA, the average adult male is more like 5' 10" or 1.77 meters tall). Let's see how tall Ethan is when compared to these:

  • Slide the unit cube next to Ethan using the Translate Gizmo

Alright, he's about 1.6 times its height

  • Scale the unit cube's height (y) to 1.6 and center its y position to 0.8

Look again. As illustrated in the following screenshot, he's not quite 1.6. So, Ethan is a little shorter than the average male (unless you include his pointy hairdo). Swinging my view around, I'm looking Ethan right in the face, and by further adjusting the cube, the eye level is about 1.4 meters. Make a note of this:

  1. Restore the unit cube's Scale (1,1,1) and Position (-2, 0.5, -2)
  2. Save the scene and the project

The following screenshot shows the comparison of the unit cube and Ethan: