# CreateJoint

> Create a PhysicsDistanceJoint in the world. See PhysicsDistanceJoint.Create.

## Definition

* **Type:** Method
* **Namespace:** [Unity.U2D.Physics](/engine/6000.7/script-reference/unity/u2d/physics.md)
* **Assembly:** UnityEngine.PhysicsCore2DModule

## CreateJoint(PhysicsWorld, PhysicsDistanceJointDefinition)

Create a PhysicsDistanceJoint in the world. See [PhysicsDistanceJoint.Create](/engine/6000.7/script-reference/unity/u2d/physics/physicsdistancejoint/create.md).

```csharp
public static PhysicsDistanceJoint CreateJoint(PhysicsWorld world, PhysicsDistanceJointDefinition definition)
```

### Parameters

**** (\[PhysicsWorld]\(/engine/6000.7/script-reference/unity/u2d/physics/physicsworld)): The world to create the joint in.**** (\[PhysicsDistanceJointDefinition]\(/engine/6000.7/script-reference/unity/u2d/physics/physicsdistancejointdefinition)): The joint definition to use.

### Returns

| Type                                                                                              | Description        |
| ------------------------------------------------------------------------------------------------- | ------------------ |
| [PhysicsDistanceJoint](/engine/6000.7/script-reference/unity/u2d/physics/physicsdistancejoint.md) | The created joint. |

## CreateJoint(PhysicsWorld, PhysicsRelativeJointDefinition)

Create a PhysicsRelativeJoint in the world. See [PhysicsRelativeJoint.Create](/engine/6000.7/script-reference/unity/u2d/physics/physicsrelativejoint/create.md).

```csharp
public static PhysicsRelativeJoint CreateJoint(PhysicsWorld world, PhysicsRelativeJointDefinition definition)
```

### Parameters

**** (\[PhysicsWorld]\(/engine/6000.7/script-reference/unity/u2d/physics/physicsworld)): The world to create the joint in.**** (\[PhysicsRelativeJointDefinition]\(/engine/6000.7/script-reference/unity/u2d/physics/physicsrelativejointdefinition)): The joint definition to use.

### Returns

| Type                                                                                              | Description        |
| ------------------------------------------------------------------------------------------------- | ------------------ |
| [PhysicsRelativeJoint](/engine/6000.7/script-reference/unity/u2d/physics/physicsrelativejoint.md) | The created joint. |

## CreateJoint(PhysicsWorld, PhysicsIgnoreJointDefinition)

Create an IgnoreJoint in the world. See [PhysicsIgnoreJoint.Create](/engine/6000.7/script-reference/unity/u2d/physics/physicsignorejoint/create.md).

```csharp
public static PhysicsIgnoreJoint CreateJoint(PhysicsWorld world, PhysicsIgnoreJointDefinition definition)
```

### Parameters

**** (\[PhysicsWorld]\(/engine/6000.7/script-reference/unity/u2d/physics/physicsworld)): The world to create the joint in.**** (\[PhysicsIgnoreJointDefinition]\(/engine/6000.7/script-reference/unity/u2d/physics/physicsignorejointdefinition)): The joint definition to use.

### Returns

| Type                                                                                          | Description        |
| --------------------------------------------------------------------------------------------- | ------------------ |
| [PhysicsIgnoreJoint](/engine/6000.7/script-reference/unity/u2d/physics/physicsignorejoint.md) | The created joint. |

## CreateJoint(PhysicsWorld, PhysicsSliderJointDefinition)

Create a SliderJoint in the world. See [PhysicsSliderJoint.Create](/engine/6000.7/script-reference/unity/u2d/physics/physicssliderjoint/create.md).

```csharp
public static PhysicsSliderJoint CreateJoint(PhysicsWorld world, PhysicsSliderJointDefinition definition)
```

### Parameters

**** (\[PhysicsWorld]\(/engine/6000.7/script-reference/unity/u2d/physics/physicsworld)): The world to create the joint in.**** (\[PhysicsSliderJointDefinition]\(/engine/6000.7/script-reference/unity/u2d/physics/physicssliderjointdefinition)): The joint definition to use.

### Returns

| Type                                                                                          | Description        |
| --------------------------------------------------------------------------------------------- | ------------------ |
| [PhysicsSliderJoint](/engine/6000.7/script-reference/unity/u2d/physics/physicssliderjoint.md) | The created joint. |

## CreateJoint(PhysicsWorld, PhysicsHingeJointDefinition)

Create a PhysicsHingeJoint in the world. See [PhysicsHingeJoint.Create](/engine/6000.7/script-reference/unity/u2d/physics/physicshingejoint/create.md).

```csharp
public static PhysicsHingeJoint CreateJoint(PhysicsWorld world, PhysicsHingeJointDefinition definition)
```

### Parameters

**** (\[PhysicsWorld]\(/engine/6000.7/script-reference/unity/u2d/physics/physicsworld)): The world to create the joint in.**** (\[PhysicsHingeJointDefinition]\(/engine/6000.7/script-reference/unity/u2d/physics/physicshingejointdefinition)): The joint definition to use.

### Returns

| Type                                                                                        | Description        |
| ------------------------------------------------------------------------------------------- | ------------------ |
| [PhysicsHingeJoint](/engine/6000.7/script-reference/unity/u2d/physics/physicshingejoint.md) | The created joint. |

## CreateJoint(PhysicsWorld, PhysicsFixedJointDefinition)

Create a FixedJoint in the world. See [PhysicsFixedJoint.Create](/engine/6000.7/script-reference/unity/u2d/physics/physicsfixedjoint/create.md).

```csharp
public static PhysicsFixedJoint CreateJoint(PhysicsWorld world, PhysicsFixedJointDefinition definition)
```

### Parameters

**** (\[PhysicsWorld]\(/engine/6000.7/script-reference/unity/u2d/physics/physicsworld)): The world to create the joint in.**** (\[PhysicsFixedJointDefinition]\(/engine/6000.7/script-reference/unity/u2d/physics/physicsfixedjointdefinition)): The joint definition to use.

### Returns

| Type                                                                                        | Description        |
| ------------------------------------------------------------------------------------------- | ------------------ |
| [PhysicsFixedJoint](/engine/6000.7/script-reference/unity/u2d/physics/physicsfixedjoint.md) | The created joint. |

## CreateJoint(PhysicsWorld, PhysicsWheelJointDefinition)

Create a WheelJoint in the world. See [PhysicsWheelJoint.Create](/engine/6000.7/script-reference/unity/u2d/physics/physicswheeljoint/create.md).

```csharp
public static PhysicsWheelJoint CreateJoint(PhysicsWorld world, PhysicsWheelJointDefinition definition)
```

### Parameters

**** (\[PhysicsWorld]\(/engine/6000.7/script-reference/unity/u2d/physics/physicsworld)): The world to create the joint in.**** (\[PhysicsWheelJointDefinition]\(/engine/6000.7/script-reference/unity/u2d/physics/physicswheeljointdefinition)): The joint definition to use.

### Returns

| Type                                                                                        | Description        |
| ------------------------------------------------------------------------------------------- | ------------------ |
| [PhysicsWheelJoint](/engine/6000.7/script-reference/unity/u2d/physics/physicswheeljoint.md) | The created joint. |
