如何修正导入模型的旋转? How do I fix the rotation of an imported model?
原地址:http://game.ceeger.com/Manual/HOWTO-FixZAxisIsUp.html
Some 3D art packages export their models so that the z-axis faces upward. Most of the standard scripts in Unity assume that the y-axis represents?up?in your 3D world. It is usually easier to fix the rotation in Unity than to modify the scripts to make things fit.
一些3D制作包導出的模型是Z軸向上的,在Unity中大多數標準腳本,假設Y軸在3D世界中表示向上的。在Unity中非常容易修正旋轉而不用修改腳本。
Your model with z-axis points upwards?你的模型是Z軸向上
If at all possible it is recommended that you fix the model in your 3D modelling application to have the y-axis face upwards before exporting.
如果有可能,建議你在導出前在3D建模軟件中修正模型以便使Y軸向上。
If this is not possible, you can fix it in Unity by adding an extra parent transform:
如果做不到這一點,你可以在Unity中添加額外的父變換來修正它。
使用GameObject->Create Empty菜單創建一個空的GameObject(游戲物體)
定位這個新的游戲對象,使他位于網格的中心或者想要物體圍繞旋轉的點上
拖拽網格到這個空的游戲對象上
You have now made your mesh a Child of an empty GameObject with the correct orientation. Whenever writing scripts that make use of the y-axis as up, attach them to the Parent empty GameObject.
現在你已經將網格作為一個具有正確方向的游戲對象的子物體了,寫腳本的時候使用Y軸向上,并將他們附加給這個空的父物體上。
The model with an extra empty transform?帶有一個額外空變換的模型
總結
以上是生活随笔為你收集整理的如何修正导入模型的旋转? How do I fix the rotation of an imported model?的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Kinect开发资源汇总
- 下一篇: linux查看系统负载常用指标与命令