CreateJoint
Create a PhysicsDistanceJoint in the world. See PhysicsDistanceJoint.Create.
Read time 2 minutesLast updated 10 days ago
Definition
- Type: Method
- Namespace: UnityEngine.LowLevelPhysics2D
- Assembly: UnityEngine.Physics2DModule
CreateJoint(PhysicsWorld, PhysicsDistanceJointDefinition)
Create a PhysicsDistanceJoint in the world. See PhysicsDistanceJoint.Create.
public static PhysicsDistanceJoint CreateJoint(PhysicsWorld world, PhysicsDistanceJointDefinition definition)
Parameters
The world to create the joint in.
The joint definition to use.
Returns
Type | Description |
|---|---|
| PhysicsDistanceJoint | The created joint. |
CreateJoint(PhysicsWorld, PhysicsRelativeJointDefinition)
Create a PhysicsRelativeJoint in the world. See PhysicsRelativeJoint.Create.
public static PhysicsRelativeJoint CreateJoint(PhysicsWorld world, PhysicsRelativeJointDefinition definition)
Parameters
The world to create the joint in.
The joint definition to use.
Returns
Type | Description |
|---|---|
| PhysicsRelativeJoint | The created joint. |
CreateJoint(PhysicsWorld, PhysicsIgnoreJointDefinition)
Create an IgnoreJoint in the world. See PhysicsIgnoreJoint.Create.
public static PhysicsIgnoreJoint CreateJoint(PhysicsWorld world, PhysicsIgnoreJointDefinition definition)
Parameters
The world to create the joint in.
The joint definition to use.
Returns
Type | Description |
|---|---|
| PhysicsIgnoreJoint | The created joint. |
CreateJoint(PhysicsWorld, PhysicsSliderJointDefinition)
Create a SliderJoint in the world. See PhysicsSliderJoint.Create.
public static PhysicsSliderJoint CreateJoint(PhysicsWorld world, PhysicsSliderJointDefinition definition)
Parameters
The world to create the joint in.
The joint definition to use.
Returns
Type | Description |
|---|---|
| PhysicsSliderJoint | The created joint. |
CreateJoint(PhysicsWorld, PhysicsHingeJointDefinition)
Create a PhysicsHingeJoint in the world. See PhysicsHingeJoint.Create.
public static PhysicsHingeJoint CreateJoint(PhysicsWorld world, PhysicsHingeJointDefinition definition)
Parameters
The world to create the joint in.
The joint definition to use.
Returns
Type | Description |
|---|---|
| PhysicsHingeJoint | The created joint. |
CreateJoint(PhysicsWorld, PhysicsFixedJointDefinition)
Create a FixedJoint in the world. See PhysicsFixedJoint.Create.
public static PhysicsFixedJoint CreateJoint(PhysicsWorld world, PhysicsFixedJointDefinition definition)
Parameters
The world to create the joint in.
The joint definition to use.
Returns
Type | Description |
|---|---|
| PhysicsFixedJoint | The created joint. |
CreateJoint(PhysicsWorld, PhysicsWheelJointDefinition)
Create a WheelJoint in the world. See PhysicsWheelJoint.Create.
public static PhysicsWheelJoint CreateJoint(PhysicsWorld world, PhysicsWheelJointDefinition definition)
Parameters
The world to create the joint in.
The joint definition to use.
Returns
Type | Description |
|---|---|
| PhysicsWheelJoint | The created joint. |