docs.unity3d.com
Search Results for

    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.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)