Joint2D
Parent class for joints to connect Rigidbody2D objects.
Read time 6 minutesLast updated 2 days ago
Definition
- Type: Class
- Namespace: UnityEngine
- Assembly: UnityEngine.Physics2DModule
- Inherits from: Behaviour
[RequireComponent(typeof(Transform), typeof(Rigidbody2D))]public class Joint2D : Behaviour
Remarks
Additional Resources: AnchoredJoint2D
Properties
Property | Description |
|---|---|
| attachedRigidbody | The Rigidbody2D attached to the Joint2D. |
| breakAction | The action to take when the joint breaks the breakForce or breakTorque. |
| breakForce | The force that needs to be applied for this joint to break. |
| breakTorque | The torque that needs to be applied for this joint to break. |
| connectedBody | The Rigidbody2D object to which the other end of the joint is attached (ie, the object without the joint component). |
| enableCollision | Should the two Rigidbody2D connected with this joint collide with each other? |
| reactionForce | Gets the reaction force of the joint. |
| reactionTorque | Gets the reaction torque of the joint. |
Methods
Method | Description |
|---|---|
| GetReactionForce | Gets the reaction force of the joint given the specified |
| GetReactionTorque | Gets the reaction torque of the joint given the specified |
Inheritance
Operators
Operator | Description |
|---|---|
| operator == | Compares two object references to see if they refer to the same object. |
| bool | Determines whether the object exists. |
| operator != | Compares if two objects refer to a different object. |