Version: Unity 6.6 Alpha (6000.6)
LanguageEnglish
  • C#

math.rotate

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public static float3 rotate(AffineTransform a, float3 dir);

Parameters

Parameter Description
a The AffineTransform.
dir The direction vector to rotate.

Returns

float3 The rotated direction vector.

Description

Returns the result of rotating a float3 vector by an AffineTransform.


Declaration

public static double3 rotate(double4x4 a, double3 b);

Parameters

Parameter Description
a Left hand side matrix argument that specifies the rotation.
b Right hand side vector argument to be rotated.

Returns

double3 The rotated vector.

Description

Return the result of rotating a double3 vector by a double4x4 matrix


Declaration

public static float3 rotate(float4x4 a, float3 b);

Parameters

Parameter Description
a Left hand side matrix argument that specifies the rotation.
b Right hand side vector argument to be rotated.

Returns

float3 The rotated vector.

Description

Return the result of rotating a float3 vector by a float4x4 matrix


Declaration

public static float3 rotate(quaternion q, float3 v);

Parameters

Parameter Description
q The quaternion rotation.
v The vector to rotate.

Returns

float3 The rotation of vector v by quaternion q.

Description

Returns the result of rotating a vector by a unit quaternion.


Declaration

public static float3 rotate(RigidTransform a, float3 dir);

Parameters

Parameter Description
a The RigidTransform.
dir The direction vector to rotate.

Returns

float3 The rotated direction vector.

Description

Returns the result of rotating a float3 vector by a RigidTransform.

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