CreateShape
Create a Circle shape, using its default definition, attached to this body.
Read time 2 minutesLast updated 9 days ago
Definition
- Type: Method
- Namespace: UnityEngine.LowLevelPhysics2D
- Assembly: UnityEngine.Physics2DModule
CreateShape(CircleGeometry)
Create a Circle shape, using its default definition, attached to this body.
public PhysicsShape CreateShape(CircleGeometry geometry)
Parameters
The geometry to use.
Returns
Type | Description |
|---|---|
| PhysicsShape | The created shape. |
CreateShape(CircleGeometry, PhysicsShapeDefinition)
Create a Circle shape attached to this body.
public PhysicsShape CreateShape(CircleGeometry geometry, PhysicsShapeDefinition definition)
Parameters
The geometry to use.
The shape definition to use.
Returns
Type | Description |
|---|---|
| PhysicsShape | The created shape. |
CreateShape(PolygonGeometry)
Create a Polygon shape, using its default definition, attached to this body.
public PhysicsShape CreateShape(PolygonGeometry geometry)
Parameters
The geometry to use.
Returns
Type | Description |
|---|---|
| PhysicsShape | The created shape. |
CreateShape(PolygonGeometry, PhysicsShapeDefinition)
Create a Polygon shape attached to this body.
public PhysicsShape CreateShape(PolygonGeometry geometry, PhysicsShapeDefinition definition)
Parameters
The geometry to use.
The shape definition to use.
Returns
Type | Description |
|---|---|
| PhysicsShape | The created shape. |
CreateShape(CapsuleGeometry)
Create a Capsule shape, using its default definition, attached to this body.
public PhysicsShape CreateShape(CapsuleGeometry geometry)
Parameters
The geometry to use.
Returns
Type | Description |
|---|---|
| PhysicsShape | The created shape. |
CreateShape(CapsuleGeometry, PhysicsShapeDefinition)
Create a Capsule shape attached to this body.
public PhysicsShape CreateShape(CapsuleGeometry geometry, PhysicsShapeDefinition definition)
Parameters
The geometry to use.
The shape definition to use.
Returns
Type | Description |
|---|---|
| PhysicsShape | The created shape. |
CreateShape(SegmentGeometry)
Create a Segment shape, using its default definition, attached to this body.
public PhysicsShape CreateShape(SegmentGeometry geometry)
Parameters
The geometry to use.
Returns
Type | Description |
|---|---|
| PhysicsShape | The created shape. |
CreateShape(SegmentGeometry, PhysicsShapeDefinition)
Create a Segment shape attached to this body.
public PhysicsShape CreateShape(SegmentGeometry geometry, PhysicsShapeDefinition definition)
Parameters
The geometry to use.
The shape definition to use.
Returns
Type | Description |
|---|---|
| PhysicsShape | The created shape. |
CreateShape(ChainSegmentGeometry)
Create a Chain Segment shape, using its default definition, attached to this body.
public PhysicsShape CreateShape(ChainSegmentGeometry geometry)
Parameters
The geometry to use.
Returns
Type | Description |
|---|---|
| PhysicsShape | The created shape. |
CreateShape(ChainSegmentGeometry, PhysicsShapeDefinition)
Create a Chain Segment shape attached to this body.
public PhysicsShape CreateShape(ChainSegmentGeometry geometry, PhysicsShapeDefinition definition)
Parameters
The geometry to use.
The shape definition to use.
Returns
Type | Description |
|---|---|
| PhysicsShape | The created shape. |