GetTransformedBy
Obtains a new pose by applying the position and rotation of another pose to this pose.
Read time 1 minuteLast updated 11 days ago
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
The pose that this pose is relative to. The method applies its position and rotation to this pose.
Returns
Type | Description |
|---|---|
| Pose | A new pose that represents this pose in the space that |
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 , then adds the position of . It combines the rotations by multiplying the rotation of by the rotation of this pose. This method doesn't modify this pose.
lhslhslhsGetTransformedBy(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 |
|---|---|
| Pose | A 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.