docs.unity.cn
    Show / Hide Table of Contents

    Method FromPosition

    FromPosition(float3)

    Returns a Transform initialized with the given position. Rotation will be identity, and scale will be 1.

    Declaration
    public static LocalTransform FromPosition(float3 position)
    Parameters
    Type Name Description
    float3 position

    The position.

    Returns
    Type Description
    LocalTransform

    The Transform.

    FromPosition(Single, Single, Single)

    Returns a Transform initialized with the given position. Rotation will be identity, and scale will be 1.

    Declaration
    public static LocalTransform FromPosition(float x, float y, float z)
    Parameters
    Type Name Description
    Single x

    The x coordinate of the position.

    Single y

    The y coordinate of the position.

    Single z

    The z coordinate of the position.

    Returns
    Type Description
    LocalTransform

    The Transform.

    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on Wednesday, June 21, 2023