docs.unity.cn
    Show / Hide Table of Contents

    Method rotate

    rotate(double4x4, double3)

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

    Declaration
    public static double3 rotate(double4x4 a, double3 b)
    Parameters
    Type Name Description
    double4x4 a

    Left hand side matrix argument that specifies the rotation.

    double3 b

    Right hand side vector argument to be rotated.

    Returns
    Type Description
    double3

    The rotated vector.

    rotate(float4x4, float3)

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

    Declaration
    public static float3 rotate(float4x4 a, float3 b)
    Parameters
    Type Name Description
    float4x4 a

    Left hand side matrix argument that specifies the rotation.

    float3 b

    Right hand side vector argument to be rotated.

    Returns
    Type Description
    float3

    The rotated vector.

    rotate(quaternion, float3)

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

    Declaration
    public static float3 rotate(quaternion q, float3 v)
    Parameters
    Type Name Description
    quaternion q

    The quaternion rotation.

    float3 v

    The vector to rotate.

    Returns
    Type Description
    float3

    The rotation of vector v by quaternion q.

    rotate(RigidTransform, float3)

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

    Declaration
    public static float3 rotate(RigidTransform a, float3 dir)
    Parameters
    Type Name Description
    RigidTransform a

    The RigidTransform.

    float3 dir

    The direction vector to rotate.

    Returns
    Type Description
    float3

    The rotated direction vector.

    Back to top Copyright © 2022 Unity Technologies
    Generated by DocFX
    on Tuesday, March 29, 2022
    Terms of use