Version: 2023.1
언어: 한국어

Transform.TransformDirections

매뉴얼로 전환
public void TransformDirections (Span<Vector3> directions);

파라미터

directions The directions to be transformed, each is replaced by the transformed version.

설명

Transforms multiple directions from local space to world space overwriting each original direction with the transformed version.

This operation is not affected by scale or position of the transform. The transformed vectors have the same length as the original versions.

If you need the inverse operation to transform from world space to local space you can use Transform.InverseTransformDirections

You should use Transform.TransformPoints for the conversion if the vectors represent positions rather than directions.

See Also: Transform.TransformDirection, Transform.InverseTransformDirections, Transform.TransformPoints, Transform.TransformVectors.


public void TransformDirections (ReadOnlySpan<Vector3> directions, Span<Vector3> transformedDirections);

파라미터

directions The directions to be transformed, these vectors are not modified by the function unless the transformedDirections span overlaps.
transformedDirections Receives the transformed directions, must be the same length as directions otherwise an exception will be thrown. If this span overlaps directions other than representing the exact same elements the behaviour is undefined.

설명

Transforms multiple directions from local space to world space writing the transformed directions to a possibly different location.

This operation is not affected by scale or position of the transform. The transformed vectors have the same length as the original versions.

If you need the inverse operation to transform from world space to local space you can use Transform.InverseTransformDirections

You should use Transform.TransformPoints for the conversion if the vectors represent positions rather than directions.

See Also: Transform.TransformDirection, Transform.InverseTransformDirections, Transform.TransformPoints, Transform.TransformVectors.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961