Version: 2022.3

TransformAccess

struct in UnityEngine.Jobs

切换到手册

描述

对象的位置、旋转和缩放。

变量

isValidUse this to determine whether this instance refers to a valid Transform.
localPosition相对于父对象的变换位置。
localRotation相对于父变换旋转的变换旋转。
localScale相对于父对象的变换缩放。
localToWorldMatrix将点从本地空间转换到世界空间的矩阵(只读)。
position世界空间中的变换位置。
rotation世界坐标系中的变换旋转,以四元数形式存储。
worldToLocalMatrix将点从世界空间转换到本地空间的矩阵(只读)。

公共函数

GetLocalPositionAndRotationGets the position and rotation of the transform in local space (that is, relative to its parent transform).
GetPositionAndRotationGets the position and rotation of the transform in world space.
SetLocalPositionAndRotationSets the position and rotation of the transform in local space (that is, relative to its parent transform).
SetPositionAndRotationSets the world space position and rotation of the transform.