- Unity Virtual Reality Projects
- Jonathan Linowes
- 367字
- 2021-06-25 21:58:26
A few observations
The back of the cube is facing us. Is that a mistake? Actually, it makes sense since the current viewpoint is looking forward. So, we should see the back of the cube. If you didn't notice already, the same goes for Ethan. It also seems like the cube has a one-unit dimension.
However, on closer examination, in the cube's Inspector panel, you'll see it imported with the scale that we gave it in Blender (0.5, 0.5, 0.5). Also, it has an X rotation of -90 (minus 90). Thus, if we reset the transform, that is, the scale to (1,1,1), it'll be 2 units in our world space and tipped over (so, don't reset it).
There's not much that we can do to compensate for the rotational adjustment without going back to Blender. But the scale can be adjusted in the model's Import Settings (in Inspector).
Blender's default up direction is Z, while Unity's is Y. Importing with a -90 X rotation adjusts for that. An imported scale can be adjusted in the object's Inspector panel's Import Settings.
We have more control when it comes to exporting FBX from Blender. As shown in the screenshot, during Export you can customize the settings, for example, making Y the up axis and Z the forward one and setting the scale factor for import:
Before ending the preceding process, select UprightCube from the Hierarchy panel and drag it into the Project panel's Assets folder. (You may consider making an Assets/Prefabs subfolder and placing it into that.) This makes it a reusable prefab, texture image and all.
There are some important lessons in this exercise (other than having learned a little bit about Blender) that apply to any 3D Unity project, including the VR ones. Normally, you will be importing models that are much more complex than a cube. You will likely run into issues related to data conversion, scale, orientation, and UV texture images that might be confusing at best. If this happens, try to break the problem into smaller, more isolated scenarios. Do little tests to gain insight into how applications exchange data and to help you understand which parameter tweaks might be necessary.
- Python爬蟲開發:從入門到實戰(微課版)
- Leap Motion Development Essentials
- Visual FoxPro 程序設計
- Learning JavaScript Data Structures and Algorithms
- 軟件測試實用教程
- 深入實踐Kotlin元編程
- JavaScript+jQuery網頁特效設計任務驅動教程
- FFmpeg開發實戰:從零基礎到短視頻上線
- 從Power BI到Analysis Services:企業級數據分析實戰
- Learning Nessus for Penetration Testing
- Node.js區塊鏈開發
- Python面試通關寶典
- 零基礎學Java第2版
- jQuery Mobile Web Development Essentials(Second Edition)
- C Primer Plus(第6版)中文版【最新修訂版】