- HoloLens Beginner's Guide
- Jason Odom
- 343字
- 2021-07-02 23:35:15
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:
- Select the object in the Hierarchy view named Main Camera.
- Look at the right side of the screen in the Inspector view.
- In the Camera component, click on the Clear Flags and select Skybox drop-down menu, as follows:

- Select Solid Color.

- 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:

- 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.
- 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.

- 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.

推薦閱讀
- 數據科學實戰手冊(R+Python)
- MySQL數據庫管理實戰
- Python程序設計(第3版)
- 云原生Spring實戰
- Mastering Python High Performance
- 實戰Java高并發程序設計(第3版)
- TradeStation交易應用實踐:量化方法構建贏家策略(原書第2版)
- Mastering Drupal 8 Views
- 用戶體驗增長:數字化·智能化·綠色化
- Node.js Design Patterns
- SQL Server 2008實用教程(第3版)
- Socket.IO Cookbook
- Learning Node.js for Mobile Application Development
- jBPM6 Developer Guide
- 計算機視覺實戰:基于TensorFlow 2