Struct JointData | Unity Physics | 0.3.2-preview
docs.unity3d.com
    Show / Hide Table of Contents

    Struct JointData

    Namespace: Unity.Physics
    Syntax
    public struct JointData

    Fields

    Constraints

    Declaration
    public JointData.ConstraintsBlob Constraints
    Field Value
    Type Description
    JointData.ConstraintsBlob

    Properties

    AFromJoint

    Declaration
    public Math.MTransform AFromJoint { get; set; }
    Property Value
    Type Description
    Math.MTransform

    BFromJoint

    Declaration
    public Math.MTransform BFromJoint { get; set; }
    Property Value
    Type Description
    Math.MTransform

    Version

    Declaration
    public byte Version { get; }
    Property Value
    Type Description
    Byte

    Methods

    Create(JointFrame, JointFrame, NativeArray<Constraint>)

    Declaration
    public static BlobAssetReference<JointData> Create(JointFrame bodyAFromJoint, JointFrame bodyBFromJoint, NativeArray<Constraint> constraints)
    Parameters
    Type Name Description
    JointFrame bodyAFromJoint
    JointFrame bodyBFromJoint
    NativeArray<Constraint> constraints
    Returns
    Type Description
    BlobAssetReference<JointData>

    Create(Math.MTransform, Math.MTransform, Constraint[])

    Declaration
    [Obsolete("Create has been deprecated. Use the variant passing JointFrame and NativeArray<Constraint> instead. (RemovedAfter 2020-05-21)")]
    public static BlobAssetReference<JointData> Create(Math.MTransform bodyAFromJoint, Math.MTransform bodyBFromJoint, Constraint[] constraints)
    Parameters
    Type Name Description
    Math.MTransform bodyAFromJoint
    Math.MTransform bodyBFromJoint
    Constraint[] constraints
    Returns
    Type Description
    BlobAssetReference<JointData>

    CreateBallAndSocket(float3, float3)

    Creates a joint constraining the point on body A to the point on body B, about which the bodies can freely rotate.

    Declaration
    public static BlobAssetReference<JointData> CreateBallAndSocket(float3 anchorA, float3 anchorB)
    Parameters
    Type Name Description
    float3 anchorA

    Specifies the anchor point in the space of body A.

    float3 anchorB

    Specifies the target point in the space of body B.

    Returns
    Type Description
    BlobAssetReference<JointData>

    CreateFixed(float3, float3, quaternion, quaternion)

    Declaration
    [Obsolete("This signature has been deprecated. Use the variant passing JointFrame instead. (RemovedAfter 2020-05-21)")]
    public static BlobAssetReference<JointData> CreateFixed(float3 positionAinA, float3 positionBinB, quaternion orientationAinA, quaternion orientationBinB)
    Parameters
    Type Name Description
    float3 positionAinA
    float3 positionBinB
    quaternion orientationAinA
    quaternion orientationBinB
    Returns
    Type Description
    BlobAssetReference<JointData>

    CreateFixed(JointFrame, JointFrame)

    Creates a joint constraining the position and orientation on body A to the target position and orientation on body B.

    Declaration
    public static BlobAssetReference<JointData> CreateFixed(JointFrame bodyAFromJoint, JointFrame bodyBFromJoint)
    Parameters
    Type Name Description
    JointFrame bodyAFromJoint

    Specifies a reference point and orientation in the space of body A.

    JointFrame bodyBFromJoint

    Specifies a target point and orientation in the space of body B.

    Returns
    Type Description
    BlobAssetReference<JointData>

    CreateHinge(float3, float3, float3, float3)

    Declaration
    [Obsolete("This signature has been deprecated. Use the variant passing JointFrame instead. (RemovedAfter 2020-05-21)")]
    public static BlobAssetReference<JointData> CreateHinge(float3 positionAinA, float3 positionBinB, float3 axisInA, float3 axisInB)
    Parameters
    Type Name Description
    float3 positionAinA
    float3 positionBinB
    float3 axisInA
    float3 axisInB
    Returns
    Type Description
    BlobAssetReference<JointData>

    CreateHinge(JointFrame, JointFrame)

    Creates a joint constraining an anchor point on body A to a target point on body B, where each body can rotate freely about the vector where their axes align. The perpendicular axes of each joint frame have no effect.

    Declaration
    public static BlobAssetReference<JointData> CreateHinge(JointFrame bodyAFromJoint, JointFrame bodyBFromJoint)
    Parameters
    Type Name Description
    JointFrame bodyAFromJoint

    Specifies the anchor point and axis of rotation in the space of body A.

    JointFrame bodyBFromJoint

    Specifies the target point and axis of alignment in the space of body B.

    Returns
    Type Description
    BlobAssetReference<JointData>

    CreateLimitedDistance(float3, float3, Math.FloatRange)

    Creates a joint constraining the point on body A to the point on body B within the specified permissible linear distance range.

    Declaration
    public static BlobAssetReference<JointData> CreateLimitedDistance(float3 anchorA, float3 anchorB, Math.FloatRange distanceRange)
    Parameters
    Type Name Description
    float3 anchorA

    Specifies the anchor point in the space of body A.

    float3 anchorB

    Specifies the target point in the space of body B.

    Math.FloatRange distanceRange

    The minimum required distance and maximum possible distance between the two anchor points.

    Returns
    Type Description
    BlobAssetReference<JointData>

    CreateLimitedHinge(float3, float3, float3, float3, float3, float3, Single, Single)

    Declaration
    [Obsolete("This signature has been deprecated. Use the variant passing JointFrame and Math.FloatRange instead. (RemovedAfter 2020-05-21)")]
    public static BlobAssetReference<JointData> CreateLimitedHinge(float3 positionAinA, float3 positionBinB, float3 axisInA, float3 axisInB, float3 perpendicularInA, float3 perpendicularInB, float minAngle, float maxAngle)
    Parameters
    Type Name Description
    float3 positionAinA
    float3 positionBinB
    float3 axisInA
    float3 axisInB
    float3 perpendicularInA
    float3 perpendicularInB
    Single minAngle
    Single maxAngle
    Returns
    Type Description
    BlobAssetReference<JointData>

    CreateLimitedHinge(JointFrame, JointFrame, Math.FloatRange)

    Creates a joint constraining an anchor point on body A to the target point on body B, where each body can rotate within a limited range about the vector where their axes align. The perpendicular axes of each joint frame are used as a reference point for the range of motion.

    Declaration
    public static BlobAssetReference<JointData> CreateLimitedHinge(JointFrame bodyAFromJoint, JointFrame bodyBFromJoint, Math.FloatRange angularRange)
    Parameters
    Type Name Description
    JointFrame bodyAFromJoint

    Specifies the anchor point, axis of rotation, and rest orientation in the space of body A.

    JointFrame bodyBFromJoint

    Specifies the target point, axis of alignment, and reference orientation in the space of body B.

    Math.FloatRange angularRange

    The minimum required and maximum possible angle of rotation about the aligned axes.

    Returns
    Type Description
    BlobAssetReference<JointData>

    CreatePrismatic(float3, float3, float3, float3, float3, float3, Single, Single, Single, Single)

    Declaration
    [Obsolete("This signature has been deprecated. Use the variant passing JointFrame and Math.FloatRange instead. (RemovedAfter 2020-05-21)")]
    public static BlobAssetReference<JointData> CreatePrismatic(float3 positionAinA, float3 positionBinB, float3 axisInA, float3 axisInB, float3 perpendicularAxisInA, float3 perpendicularAxisInB, float minDistanceOnAxis, float maxDistanceOnAxis, float minDistanceFromAxis, float maxDistanceFromAxis)
    Parameters
    Type Name Description
    float3 positionAinA
    float3 positionBinB
    float3 axisInA
    float3 axisInB
    float3 perpendicularAxisInA
    float3 perpendicularAxisInB
    Single minDistanceOnAxis
    Single maxDistanceOnAxis
    Single minDistanceFromAxis
    Single maxDistanceFromAxis
    Returns
    Type Description
    BlobAssetReference<JointData>

    CreatePrismatic(JointFrame, JointFrame, Math.FloatRange, Math.FloatRange)

    Creates a joint constraining an anchor on body A to a target point on body B, where the bodies can translate within a tube-shaped volume. The tube is oriented down the length of the vector where their axes align.

    Declaration
    public static BlobAssetReference<JointData> CreatePrismatic(JointFrame bodyAFromJoint, JointFrame bodyBFromJoint, Math.FloatRange distanceOnAxis, Math.FloatRange distanceFromAxis)
    Parameters
    Type Name Description
    JointFrame bodyAFromJoint

    Specifies the anchor point and axis of rotation in the space of body A.

    JointFrame bodyBFromJoint

    Specifies the target point and axis of alignment in the space of body B.

    Math.FloatRange distanceOnAxis

    The minimum required and maximum possible distance between the two anchor points along their aligned axes.

    Math.FloatRange distanceFromAxis

    The minimum required and maximum possible distance between the two anchor points along a radius of the cylinder within which they can move.

    Returns
    Type Description
    BlobAssetReference<JointData>

    CreateRagdoll(float3, float3, float3, float3, float3, float3, Single, Single, Single, Single, Single, out BlobAssetReference<JointData>, out BlobAssetReference<JointData>)

    Declaration
    [Obsolete("This signature has been deprecated. Use the variant passing JointFrame and Math.FloatRange instead. (RemovedAfter 2020-05-21)")]
    public static void CreateRagdoll(float3 positionAinA, float3 positionBinB, float3 twistAxisInA, float3 twistAxisInB, float3 perpendicularAxisInA, float3 perpendicularAxisInB, float maxConeAngle, float minPerpendicularAngle, float maxPerpendicularAngle, float minTwistAngle, float maxTwistAngle, out BlobAssetReference<JointData> jointData0, out BlobAssetReference<JointData> jointData1)
    Parameters
    Type Name Description
    float3 positionAinA
    float3 positionBinB
    float3 twistAxisInA
    float3 twistAxisInB
    float3 perpendicularAxisInA
    float3 perpendicularAxisInB
    Single maxConeAngle
    Single minPerpendicularAngle
    Single maxPerpendicularAngle
    Single minTwistAngle
    Single maxTwistAngle
    BlobAssetReference<JointData> jointData0
    BlobAssetReference<JointData> jointData1

    CreateRagdoll(JointFrame, JointFrame, Single, Math.FloatRange, Math.FloatRange, out BlobAssetReference<JointData>, out BlobAssetReference<JointData>)

    Creates a pair of joints constraining an anchor point on body A to a target point on body B, with a complex angular range of motion suitable for multi-axial joints on characters. The primary axis of the joined bodies can rotate within a range of motion defined by the maximum cone angle, minus the intersection with a pair of cones along the perpendicular axis. The bodies may also twist about the primary axis within this range.

    Declaration
    public static void CreateRagdoll(JointFrame bodyAFromJoint, JointFrame bodyBFromJoint, float maxConeAngle, Math.FloatRange angularPlaneRange, Math.FloatRange angularTwistRange, out BlobAssetReference<JointData> jointData0, out BlobAssetReference<JointData> jointData1)
    Parameters
    Type Name Description
    JointFrame bodyAFromJoint

    Specifies the anchor point, axis of rotation, and rest orientation in the space of body A.

    JointFrame bodyBFromJoint

    Specifies the target point, axis of alignment, and reference orientation in the space of body B.

    Single maxConeAngle

    Half angle of the primary cone, which defines the maximum possible range of motion in which the primary axis is restricted.

    Math.FloatRange angularPlaneRange

    The range of angular motion defining the cones perpendicular to the primary cone, between which the primary axis may swing. This range may be asymmetrical.

    Math.FloatRange angularTwistRange

    The range of angular motion for twisting around the primary axis within the region defined by the primary and perpendicular cones. This range is usually symmetrical.

    BlobAssetReference<JointData> jointData0

    The first joint in the system.

    BlobAssetReference<JointData> jointData1

    The second joint in the system.

    CreateStiffSpring(float3, float3, Single, Single)

    Declaration
    [Obsolete("This method been deprecated. Use CreateLimitedDistance() instead. (RemovedAfter 2020-05-21)")]
    public static BlobAssetReference<JointData> CreateStiffSpring(float3 anchorA, float3 anchorB, float minDistance, float maxDistance)
    Parameters
    Type Name Description
    float3 anchorA
    float3 anchorB
    Single minDistance
    Single maxDistance
    Returns
    Type Description
    BlobAssetReference<JointData>
    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