Version: 2022.3
言語: 日本語

Transform.InverseTransformDirections

マニュアルに切り替える
public void InverseTransformDirections (Span<Vector3> directions);

パラメーター

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

説明

Transforms multiple directions from world space to local space overwriting each original position with the transformed version. The opposite of Transform.TransformDirections.

This operation is not affected by scale or position of the transform. The transformed vectors have the same lengths as the originals.

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

You should use Transform.InverseTransformPoints if the vectors represent positions in space rather than directions.

See Also:Transform.InverseTransformDirection, Transform.TransformDirections, Transform.InverseTransformPoints, Transform.InverseTransformVectors.


public void InverseTransformDirections (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 the directions span 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 world space to local space writing the transformed positions to a possibly different location. The opposite of Transform.TransformDirections.

This operation is not affected by scale or position of the transform. The transformed vectors have the same lengths as the originals.

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

You should use Transform.InverseTransformPoints if the vectors represent positions in space rather than directions.

See Also:Transform.InverseTransformDirection, Transform.TransformDirections, Transform.InverseTransformPoints, Transform.InverseTransformVectors.

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