LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

This version of Unity is unsupported.

Transform.TransformVector

Switch to Manual
public Vector3 TransformVector(Vector3 vector);

Description

Transforms vector from local space to world space.

This operation is not affected by position of the transform, but is is affected by scale. The returned vector may have a different length than vector.


public Vector3 TransformVector(float x, float y, float z);

Description

Transforms vector x, y, z from local space to world space.

This operation is not affected by position of the transform, but is is affected by scale. The returned vector may have a different length than vector.