官术网_书友最值得收藏!

The layout of a HoloLens project

The most basic Unity project is made up of at least one scene. Any new scene will contain a directional light and main camera. The HoloLens uses this camera as the user's point of view, so we will need to make a few changes to the default starting scene to suit our needs.

Here, we will set up our main camera, so our program will work correctly with HoloLens:

  1. Select the object in the Hierarchy view named Main Camera.
  2. Look at the right side of the screen in the Inspector view.
  3. In the Camera component, click on the Clear Flags and select Skybox drop-down menu, as follows:
  1. Select Solid Color.
  1. Ensuring that Main Camera is still selected, click on the Background color box (which is currently a deep blue); this will bring up the Color Picker dialog box:
  1. In the numeric input fields, change the numbers to R=0, G= 0, B=0, and A= 0 and close the color picker. With the HoloLens a black color with 0 Alpha transparency is needed for a perfectly transparent 3D background.

The HoloLens uses the background color to determine its transparency. Black is completely transparent. If you use black on objects throughout your project, you will run into problems with see-through objects. Also, using colors other than black for the background can block the users' view of the world, which can be extremely disorienting and dangerous for the user.

  1. Next, look for the Clipping Planes option and its input field labeled Near. Here, we will need to change the default 0.3 to the recommended 0.85. Due to the nature of HoloLens, anything closer than 0.85 meters causes the user to cross their eyes and, it can be disorienting.
  1. With the Main Camera still selected, look at the Transform component. The first option in that box is labeled Position. You will notice X, Y, and Z input fields; change the Z element from its default of -10 to 0.
主站蜘蛛池模板: 韩城市| 象州县| 区。| 时尚| 威海市| 天全县| 浪卡子县| 枞阳县| 湖南省| 揭东县| 临西县| 神木县| 宜州市| 顺昌县| 洪泽县| 杭锦旗| 北碚区| 清苑县| 电白县| 宁津县| 石林| 城口县| 宿州市| 阿坝| 岱山县| 安平县| 蕲春县| 松原市| 元阳县| 石狮市| 昌吉市| 连江县| 邮箱| 金溪县| 平武县| 璧山县| 东安县| 永仁县| 海原县| 扎赉特旗| 澄城县|