docs.unity.cn
    Show / Hide Table of Contents

    Method rotate

    rotate(AffineTransform, float3)

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

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

    The AffineTransform.

    float3 dir

    The direction vector to rotate.

    Returns
    Type Description
    float3

    The rotated direction vector.

    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 © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023