zoukankan      html  css  js  c++  java
  • 如何修正导入模型的旋转? 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中添加额外的父变换来修正它。

    1. Create an empty GameObject using the GameObject->Create Empty menu 
      使用GameObject->Create Empty菜单创建一个空的GameObject(游戏物体)
    2. Position the new GameObject so that it is at the center of your mesh or whichever point you want your object to rotate around. 
      定位这个新的游戏对象,使他位于网格的中心或者想要物体围绕旋转的点上
    3. 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 带有一个额外空变换的模型

  • 相关阅读:
    “error LNK1169: 找到一个或多个多重定义的符号”的解决方法(转载)
    std::ostringstream 转std::string
    【转载】红外感应模块+蜂鸣器实现简易报警
    分割字符串使用空格
    优秀程序员的 18 大法则【转载】
    解决win10 iot VS编程出现的无法引用错误
    [转载] 程序员如何成功追到女神?
    win8/win10/win2012r2 存储池 冗余分析
    [转载][NAS] 使用win8的“存储池”功能~
    mySQL中删除unique key的语法 (删除某个字段的唯一性)
  • 原文地址:https://www.cnblogs.com/123ing/p/3816201.html
Copyright © 2011-2022 走看看