Version: Unity 6.5 Alpha (6000.5)
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.