当前位置:网站首页>【解决】修改子物体Transform信息导致变换不对称、异常问题的解决方案
【解决】修改子物体Transform信息导致变换不对称、异常问题的解决方案
2022-06-11 22:16:00 【野奔在山外的猫】
开发平台:Unity
编程平台:Visual Studio 2020以上
使用语言:C#
问题描述
在修改、调整 GameObject 子对象的 Transform 组件信息时,出现的因修改 Rotation 组件值导致与实际期望不符合的问题。如下图所示:
更多说明:
- 物体01、物体02、物体03、嵌套空 所代表的对象均为 Empty GameObject。且 Transform 组件下 Scale 数值均不为1.
- 圆柱体 为外部模型资源导入对象。在 AssetDatabase 中设置 Scale Factory 为默认值。
- Cube、Plane 的 Transform 组件值均使用默认值大小。
问题原因:
在 Unity 世界中,Scale 数值的大小基于其父对象的 Scale 值大小进行等效变化。即父对象大小发生变化时,子对象应具备其对应的变化大小。默认情况下,可理解 Hierarchy 面板中无父对象的 GameObject 对象视为 场景世界的子对象。如上图所示,对形变大小的情况进行了以下排查:
- 排查 嵌套子对象下,被嵌套对象的子对象的形变情况。
- 排查 引用外部模型,进行观察嵌套情况下子对象的形变情况。
- 排查 因 GameObject 对象不同下的子对象形变情况。
解决方案
规范所有确认使用的 Mesh Renderer、Mesh Filter 组件的 GameObject 对象的父对象及其路径上所有父对象。使其所有的父对象 Scale 值均控制在数值1上。例如 国企旗杆 模型进行内部分解:
- Empty GameObject
= 国旗旗帜 模型
= 国旗旗杆 模型
= 国旗平台 模型
若细化 国旗旗杆 模型还需细化,则应当如下:
- Empty GameObject
= 国旗旗帜 模型
= Empy GameObject
= 国旗旗杆 模型
= 国旗缆绳 模型
= 国旗平台 模型

边栏推荐
- 科普 | NFT的类型有哪些(上)
- Maze problem in C language
- [Yu Yue education] basic engineering English of Zhejiang industrial and Commercial University (wuyiping) reference materials
- Is the securities account recommended by qiniu safe? Is it reliable
- win11怎么看电脑显卡信息
- R language book learning 03 "in simple terms R language data analysis" - Chapter 10 association rules Chapter 11 random forest
- swiper——单页面多轮播插件冲突解决方案
- Go OS module
- The shortcomings of the "big model" and the strengths of the "knowledge map"
- [Chongqing Guangdong education] college physics of Xiangtan University: mechanical and thermal reference materials
猜你喜欢

Win10弹出USB时出现该设备正在使用的解决方法

打印机无法打印测试页是什么原因

Precision twist jitter

Nmap performs analysis of all network segment IP survivals in host detection

Tkinter学习笔记(二)

A simple example of linear regression in machine learning
![[today in history] June 11: the co inventor of Monte Carlo method was born; Google launched Google Earth; Google acquires waze](/img/eb/147d4aac20639d50b204dcf424c9e2.png)
[today in history] June 11: the co inventor of Monte Carlo method was born; Google launched Google Earth; Google acquires waze

NLP - fastText

astra pro双目相机ros下启动笔记

How to view computer graphics card information in win11
随机推荐
Analysis of the implementation principle of an open source markdown to rich text editor
利用SecureCRTPortable脚本功能完成网络设备的数据读取
Superscalar processor design yaoyongbin Chapter 2 cache -- Excerpt from subsection 2.3
剑指offer数组题型总结篇
移动端——swipe特效之图片时间轴
Is it safe for qiniu business school to send Huatai account? Really?
电脑强制关机 oracle登录不上
什么是死锁?(把死锁给大家讲明白,知道是什么,为什么用,怎么用)
360 online enterprise security cloud is open to small, medium and micro enterprises for free
[Matlab]二阶节约响应
win10字体模糊怎么调节
leetcode 中的位运算
Go OS module
Unity3D getLaunchIntentForPackage 获取包返回null问题
Tkinter study notes (III)
R language book learning 03 "in simple terms R language data analysis" - Chapter 8 logistic regression model Chapter 9 clustering model
【Uniapp 原生插件】商米钱箱插件
[academic related] under the application review system, how difficult is it to study for a doctoral degree in a double first-class university?
重温c语言一
玩家必读|Starfish NFT进阶攻略