文档

Unity Engine

Download Unity

Unity Engine

GetTransformedBy

Obtains a new pose by applying the position and rotation of another pose to this pose.
阅读时间1 分钟最后更新于 11 天前

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule

GetTransformedBy(Pose)

Obtains a new pose by applying the position and rotation of another pose to this pose.
public Pose GetTransformedBy(Pose lhs)

Parameters

lhs

The pose that this pose is relative to. The method applies its position and rotation to this pose.

Returns

Type

Description

PoseA new pose that represents this pose in the space that
lhs
is defined in.

Remarks

Use this method to convert a pose that's defined relative to a parent pose into the space of that parent pose. The method rotates the position of this pose by the rotation of
lhs
, then adds the position of
lhs
. It combines the rotations by multiplying the rotation of
lhs
by the rotation of this pose. This method doesn't modify this pose.

GetTransformedBy(Transform)

Obtains a new pose by converting this pose from the local space of a transform to world space.
public Pose GetTransformedBy(Transform lhs)

Parameters

The transform that defines the local space of this pose. The method applies the position, rotation, and scale of the transform to this pose.

Returns

Type

Description

PoseA new pose that represents this pose in world space.

Remarks

Use this method to convert a pose from the local space of a GameObject's transform into world space. The method converts the position of this pose with Transform.TransformPoint, so the result includes the position, rotation, and scale of the transform. It combines the rotations by multiplying the world rotation of the transform by the rotation of this pose. This method doesn't modify this pose.