Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


rotate

Returns the result of rotating a float3 vector by an AffineTransform.
Read time 1 minuteLast updated 10 days ago

Definition

rotate(AffineTransform, float3)

Returns the result of rotating a float3 vector by an AffineTransform.
public static float3 rotate(AffineTransform a, float3 dir)

Parameters

The AffineTransform.

The direction vector to rotate.

Returns

Type

Description

float3The rotated direction vector.

rotate(double4x4, double3)

Return the result of rotating a double3 vector by a double4x4 matrix
public static double3 rotate(double4x4 a, double3 b)

Parameters

Left hand side matrix argument that specifies the rotation.

Right hand side vector argument to be rotated.

Returns

Type

Description

double3The rotated vector.

rotate(float4x4, float3)

Return the result of rotating a float3 vector by a float4x4 matrix
public static float3 rotate(float4x4 a, float3 b)

Parameters

Left hand side matrix argument that specifies the rotation.

Right hand side vector argument to be rotated.

Returns

Type

Description

float3The rotated vector.

rotate(quaternion, float3)

Returns the result of rotating a vector by a unit quaternion.
public static float3 rotate(quaternion q, float3 v)

Parameters

The quaternion rotation.

The vector to rotate.

Returns

Type

Description

float3The rotation of vector v by quaternion q.

rotate(RigidTransform, float3)

Returns the result of rotating a float3 vector by a RigidTransform.
public static float3 rotate(RigidTransform a, float3 dir)

Parameters

The RigidTransform.

The direction vector to rotate.

Returns

Type

Description

float3The rotated direction vector.