HingeJoint2D
Joint that allows a Rigidbody2D object to rotate around a point in space or a point on another object.
Read time 7 minutesLast updated 2 days ago
Definition
- Type: Class
- Namespace: UnityEngine
- Assembly: UnityEngine.Physics2DModule
- Inherits from: AnchoredJoint2D
public sealed class HingeJoint2D : AnchoredJoint2D
Remarks
Properties
Property | Description |
|---|---|
| jointAngle | The current joint angle (in degrees) with respect to the reference angle. |
| jointSpeed | The current joint speed. |
| limits | Limit of angular rotation (in degrees) on the joint. |
| limitState | Gets the state of the joint limit. |
| motor | Parameters for the motor force applied to the joint. |
| referenceAngle | The angle (in degrees) referenced between the two bodies used as the constraint for the joint. |
| useConnectedAnchor | Controls whether the connected anchor is used or not. |
| useLimits | Should limits be placed on the range of rotation? |
| useMotor | Should the joint be rotated automatically by a motor torque? |
Methods
Method | Description |
|---|---|
| GetMotorTorque | Gets the motor 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. |