Struct JointData
Syntax
Fields
Constraints
Declaration
public JointData.ConstraintsBlob Constraints
Field Value
Properties
AFromJoint
Declaration
public Math.MTransform AFromJoint { get; set; }
Property Value
BFromJoint
Declaration
public Math.MTransform BFromJoint { get; set; }
Property Value
Version
Declaration
public byte Version { get; }
Property Value
Methods
Create(JointFrame, JointFrame, NativeArray<Constraint>)
Declaration
public static BlobAssetReference<JointData> Create(JointFrame bodyAFromJoint, JointFrame bodyBFromJoint, NativeArray<Constraint> constraints)
Parameters
Returns
Type |
Description |
BlobAssetReference<JointData> |
|
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
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> |
|
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.