WheelJoint2D
The wheel joint allows the simulation of wheels by providing a constraining suspension motion with an optional motor.
Read time 7 minutesLast updated 3 days ago
Definition
- Type: Class
- Namespace: UnityEngine
- Assembly: UnityEngine.Physics2DModule
- Inherits from: AnchoredJoint2D
public sealed class WheelJoint2D : AnchoredJoint2D
Remarks
Additional Resources: JointSuspension2D.
Properties
Property | Description |
|---|---|
| jointAngle | The current joint angle (in degrees) defined as the relative angle between the two Rigidbody2D that the joint connects to. |
| jointLinearSpeed | The current joint linear speed in meters/sec. |
| jointSpeed | The current joint rotational speed in degrees/sec. |
| jointTranslation | The current joint translation. |
| motor | Parameters for a motor force that is applied automatically to the Rigidbody2D along the line. |
| suspension | Set the joint suspension configuration. |
| useMotor | Should a motor force be applied automatically to the Rigidbody2D? |
Methods
Method | Description |
|---|---|
| GetMotorTorque | Gets the motor torque of the joint given the specified timestep. |
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. |