docs.unity.cn
    Show / Hide Table of Contents

    Method RigidTransform

    RigidTransform(quaternion, float3)

    Returns a RigidTransform constructed from a rotation represented by a unit quaternion and a translation represented by a float3 vector.

    Declaration
    public static RigidTransform RigidTransform(quaternion rot, float3 pos)
    Parameters
    Type Name Description
    quaternion rot

    The quaternion rotation.

    float3 pos

    The translation vector.

    Returns
    Type Description
    RigidTransform

    The RigidTransform of the given rotation quaternion and translation vector.

    RigidTransform(float3x3, float3)

    Returns a RigidTransform constructed from a rotation represented by a float3x3 rotation matrix and a translation represented by a float3 vector.

    Declaration
    public static RigidTransform RigidTransform(float3x3 rotation, float3 translation)
    Parameters
    Type Name Description
    float3x3 rotation

    The float3x3 rotation matrix.

    float3 translation

    The translation vector.

    Returns
    Type Description
    RigidTransform

    The RigidTransform of the given rotation matrix and translation vector.

    RigidTransform(float4x4)

    Returns a RigidTransform constructed from a rotation represented by a float3x3 matrix and a translation represented by a float3 vector.

    Declaration
    public static RigidTransform RigidTransform(float4x4 transform)
    Parameters
    Type Name Description
    float4x4 transform

    The float4x4 transformation matrix.

    Returns
    Type Description
    RigidTransform

    The RigidTransform of the given float4x4 transformation matrix.

    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