如何修正导入模型的旋转? How do I fix the rotation of an imported model?
2014-06-30 10:57
393 查看
原地址: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中添加额外的父变换来修正它。
Create an empty GameObject using the GameObject->Create Empty menu
使用GameObject->Create Empty菜单创建一个空的GameObject(游戏物体)
Position the new GameObject so that it is at the center of your mesh or whichever point you want your object to rotate around.
定位这个新的游戏对象,使他位于网格的中心或者想要物体围绕旋转的点上
Drag the mesh onto the 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 带有一个额外空变换的模型
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中添加额外的父变换来修正它。
Create an empty GameObject using the GameObject->Create Empty menu
使用GameObject->Create Empty菜单创建一个空的GameObject(游戏物体)
Position the new GameObject so that it is at the center of your mesh or whichever point you want your object to rotate around.
定位这个新的游戏对象,使他位于网格的中心或者想要物体围绕旋转的点上
Drag the mesh onto the 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 bind the values of an enum to a ComboBox?
- Unity3D 如何图形问题修正旋转模型已导入?
- How do I sort an array of hashes by a value in the hash?
- Lotus Workflow 如何複製工作屬性 How do I copy the job of property
- How do you copy the contents of an array to a std::vector in C++ without looping? (From stack over flow)
- Unity3D 图形问题之如何修正已导入模型的旋转?
- How to Save an ARIMA Time Series Forecasting Model in Python (如何在Python中保存ARIMA时间序列预测模型)
- How to Build an Economic Model in Your Spare Time (如何利用业余时间建立经济模型)
- How do I get the name of an object's type in JavaScript
- How do I check if a type is a subtype OR the type of an object?
- How do I make my GUI plot into an axes within the GUI figure rather than inside of a new figure in M
- How do I sort an array of hashes by a value in the hash?
- All-In-One Code Framework(AIO): 如何使用C#编写进程外的COM组件 (How to write an out-of-proc COM server in C#)
- Here's an example that shows how to enumerate through the features of a selection set, returning the value of each field in the attribute table except for the geometry colum.
- How to fix the dreaded "java.lang.OutOfMemoryError- PermGen space" exception (classloader leaks)
- 如何处理Jdeveloper 启动时出现的错误-Unable to create an instance of the Java Virtual Machine
- PowerTip of the Day-How Much RAM Do You Have?
- How one VBA project can use an object declared in the class module of another project
- XAF 如何扩展应用程序模型(How to: Extend the Application Model )<一> ListView显示页脚信息
- How to draw an Icon on the IndicatorPane of Series 60