Unity3D圣典3.3版本-中文版
文集大纲加载中……
本文档使用 MrDoc 发布
-
+
首页
Transform.lossyScale 有损缩放
# [Transform](Transform.html).lossyScale 有损缩放 var *lossyScale* : [Vector3](../Vector3/Vector3.html) *Description* 描述 The global scale of the object (Read Only). 物体的全局缩放(只读)。 Please note that if you have a parent transform with scale and a child that is arbitrarily rotated, the scale will be skewed. Thus scale can not be represented correctly in a 3 component vector but only a 3x3 matrix. Such a representation is quite inconvenient to work with however. lossyScale is a convenience property that attempts to match the actual world scale as much as it can. If your objects are not skewed the value will be completely correct and most likely the value will not be very different if it contains skew too. 请注意日光你有一个有缩放的父物体变换和子物体有任意旋转的,缩放将有偏差。因此缩放不能正确的表示在 3 组件的向量,而是一个 3x3 矩阵。这样表示工作十分不方便,lossyScale 是个很方便的属性,它尽量匹配实际世界缩放,如果你的物体不是有偏差的,这个值将是完全正确的,如果物体包含偏差,这个值也不会有很大的不同。 * [C#](#) * [JavaScript](#) ``` using UnityEngine; using System.Collections; public class example : MonoBehaviour { public void Awake() { print(transform.lossyScale); } } ``` ``` print (transform.lossyScale); ```
da
2022年5月23日 14:50
转发文档
收藏文档
上一篇
下一篇
手机扫码
复制链接
手机扫一扫转发分享
复制链接
关于 MrDoc
觅思文档MrDoc
是
州的先生
开发并开源的在线文档系统,其适合作为个人和小型团队的云笔记、文档和知识库管理工具。
如果觅思文档给你或你的团队带来了帮助,欢迎对作者进行一些打赏捐助,这将有力支持作者持续投入精力更新和维护觅思文档,感谢你的捐助!
>>>捐助鸣谢列表
微信
支付宝
QQ
PayPal
Markdown文件
分享
链接
类型
密码
更新密码