Struct BodyFrame
A target in the space of a rigid body that will align with a corresponding target in the space of the other body to which it is constrained.
Implements
Inherited Members
Namespace: Unity.Physics
Assembly: Unity.Physics.dll
Syntax
public struct BodyFrame : IEquatable<BodyFrame>Constructors
BodyFrame(RigidTransform)
Constructor.
Declaration
public BodyFrame(RigidTransform transform)Parameters
| Type | Name | Description | 
|---|---|---|
| RigidTransform | transform | The transform. | 
Fields
Axis
The bind pose orientation of the joint's x-axis in the space of its rigid body.
Declaration
public float3 AxisField Value
| Type | Description | 
|---|---|
| float3 | 
Identity
The identity BodyFrame.
Declaration
public static readonly BodyFrame IdentityField Value
| Type | Description | 
|---|---|
| BodyFrame | 
PerpendicularAxis
The bind pose orientation of the joint's y-axis in the space of its rigid body.
Declaration
public float3 PerpendicularAxisField Value
| Type | Description | 
|---|---|
| float3 | 
Position
The bind pose anchor or target position of the joint in the space of its rigid body.
Declaration
public float3 PositionField Value
| Type | Description | 
|---|---|
| float3 | 
Methods
AsRigidTransform()
Converts this object to a rigid transform.
Declaration
public RigidTransform AsRigidTransform()Returns
| Type | Description | 
|---|---|
| RigidTransform | A RigidTransform. | 
Equals(object)
Tests if this object is considered equal to another.
Declaration
public override bool Equals(object obj)Parameters
| Type | Name | Description | 
|---|---|---|
| object | obj | The object to compare to this object. | 
Returns
| Type | Description | 
|---|---|
| bool | True if the objects are considered equal, false if they are not. | 
Overrides
Equals(BodyFrame)
Tests if this BodyFrame is considered equal to another.
Declaration
public bool Equals(BodyFrame other)Parameters
| Type | Name | Description | 
|---|---|---|
| BodyFrame | other | The body frame to compare to this object. | 
Returns
| Type | Description | 
|---|---|
| bool | True if the objects are considered equal, false if they are not. | 
GetHashCode()
Calculates a hash code for this object.
Declaration
public override int GetHashCode()Returns
| Type | Description | 
|---|---|
| int | A hash code for this object. | 
Overrides
ToString()
Convert this object into a string representation.
Declaration
public override string ToString()Returns
| Type | Description | 
|---|---|
| string | A string that represents this object. | 
Overrides
Operators
implicit operator BodyFrame(RigidTransform)
Implicit cast that converts the given RigidTransform to a BodyFrame.
Declaration
public static implicit operator BodyFrame(RigidTransform transform)Parameters
| Type | Name | Description | 
|---|---|---|
| RigidTransform | transform | The transform. | 
Returns
| Type | Description | 
|---|---|
| BodyFrame | The result of the operation. |